Skip to main content

db_proxies

Creates, updates, deletes, gets or lists a db_proxies resource.

Overview

Namedb_proxies
TypeResource
Idaws.rds.db_proxies

Fields

The following fields are returned by SELECT queries:

NameDatatypeDescription
authstringOne or more data structures specifying the authorization mechanism to connect to the associated RDS DB instance or Aurora DB cluster.
created_datestringThe date and time when the proxy was first created.
db_proxy_arnstringThe Amazon Resource Name (ARN) for the proxy.
db_proxy_namestringThe identifier for the proxy. This name must be unique for all proxies owned by your Amazon Web Services account in the specified Amazon Web Services Region.
debug_loggingbooleanSpecifies whether the proxy logs detailed connection and query information. When you enable DebugLogging, the proxy captures connection details and connection pool behavior from your queries. Debug logging increases CloudWatch costs and can impact proxy performance. Enable this option only when you need to troubleshoot connection or performance issues.
default_auth_schemestringThe default authentication scheme that the proxy uses for client connections to the proxy and connections from the proxy to the underlying database. Valid values are NONE and IAM_AUTH. When set to IAM_AUTH, the proxy uses end-to-end IAM authentication to connect to the database.
endpointstringThe endpoint that you can use to connect to the DB proxy. You include the endpoint value in the connection string for a database client application.
endpoint_network_typestringThe network type of the DB proxy endpoint. The network type determines the IP version that the proxy endpoint supports. Valid values: IPV4 - The proxy endpoint supports IPv4 only. IPV6 - The proxy endpoint supports IPv6 only. DUAL - The proxy endpoint supports both IPv4 and IPv6.
engine_familystringThe kinds of databases that the proxy can connect to. This value determines which database network protocol the proxy recognizes when it interprets network traffic to and from the database. MYSQL supports Aurora MySQL, RDS for MariaDB, and RDS for MySQL databases. POSTGRESQL supports Aurora PostgreSQL and RDS for PostgreSQL databases. SQLSERVER supports RDS for Microsoft SQL Server databases.
idle_client_timeoutintegerThe number of seconds a connection to the proxy can have no activity before the proxy drops the client connection. The proxy keeps the underlying database connection open and puts it back into the connection pool for reuse by later connection requests. Default: 1800 (30 minutes) Constraints: 1 to 28,800
require_tlsbooleanIndicates whether Transport Layer Security (TLS) encryption is required for connections to the proxy.
role_arnstringThe Amazon Resource Name (ARN) for the IAM role that the proxy uses to access Amazon Secrets Manager.
statusstringThe current status of this proxy. A status of available means the proxy is ready to handle requests. Other values indicate that you must wait for the proxy to be ready, or take some action to resolve an issue.
target_connection_network_typestringThe network type that the proxy uses to connect to the target database. The network type determines the IP version that the proxy uses for connections to the database. Valid values: IPV4 - The proxy connects to the database using IPv4 only. IPV6 - The proxy connects to the database using IPv6 only.
updated_datestringThe date and time when the proxy was last updated.
vpc_idstringProvides the VPC ID of the DB proxy.
vpc_security_group_idsstringProvides a list of VPC security groups that the proxy belongs to.
vpc_subnet_idsstringThe EC2 subnet IDs for the proxy.

Methods

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
describe_db_proxiesselectregionDBProxyName, Filters, Marker, MaxRecordsReturns information about DB proxies.
create_db_proxyinsertDBProxyName, EngineFamily, RoleArn, VpcSubnetIds, regionDefaultAuthScheme, Auth, VpcSecurityGroupIds, RequireTLS, IdleClientTimeout, DebugLogging, Tags, EndpointNetworkType, TargetConnectionNetworkTypeCreates a new DB proxy.
modify_db_proxyupdateDBProxyName, regionNewDBProxyName, DefaultAuthScheme, Auth, RequireTLS, IdleClientTimeout, DebugLogging, RoleArn, SecurityGroupsChanges the settings for an existing DB proxy.
delete_db_proxydeleteDBProxyName, regionDeletes an existing DB proxy.

Parameters

Parameters can be passed in the WHERE clause of a query. Check the Methods section to see which parameters are required or optional for each operation.

NameDatatypeDescription
DBProxyNamestringThe name of the DB proxy to delete.
EngineFamilystringThe kinds of databases that the proxy can connect to. This value determines which database network protocol the proxy recognizes when it interprets network traffic to and from the database. For Aurora MySQL, RDS for MariaDB, and RDS for MySQL databases, specify MYSQL. For Aurora PostgreSQL and RDS for PostgreSQL databases, specify POSTGRESQL. For RDS for Microsoft SQL Server, specify SQLSERVER.
RoleArnstringThe Amazon Resource Name (ARN) of the IAM role that the proxy uses to access secrets in Amazon Web Services Secrets Manager.
VpcSubnetIdsarrayOne or more VPC subnet IDs to associate with the new proxy.
regionstringAWS region (default: us-east-1)
AutharrayThe new authentication settings for the DBProxy.
DBProxyNamestringThe name of the DB proxy. If you omit this parameter, the output includes information about all DB proxies owned by your Amazon Web Services account ID.
DebugLoggingbooleanSpecifies whether the proxy logs detailed connection and query information. When you enable DebugLogging, the proxy captures connection details and connection pool behavior from your queries. Debug logging increases CloudWatch costs and can impact proxy performance. Enable this option only when you need to troubleshoot connection or performance issues.
DefaultAuthSchemestringThe default authentication scheme that the proxy uses for client connections to the proxy and connections from the proxy to the underlying database. Valid values are NONE and IAM_AUTH. When set to IAM_AUTH, the proxy uses end-to-end IAM authentication to connect to the database.
EndpointNetworkTypestringThe network type of the DB proxy endpoint. The network type determines the IP version that the proxy endpoint supports. Valid values: IPV4 - The proxy endpoint supports IPv4 only. IPV6 - The proxy endpoint supports IPv6 only. DUAL - The proxy endpoint supports both IPv4 and IPv6. Default: IPV4 Constraints: If you specify IPV6 or DUAL, the VPC and all subnets must have an IPv6 CIDR block. If you specify IPV6 or DUAL, the VPC tenancy cannot be dedicated.
FiltersarrayThis parameter is not currently supported.
IdleClientTimeoutintegerThe number of seconds that a connection to the proxy can be inactive before the proxy disconnects it. You can set this value higher or lower than the connection timeout limit for the associated database.
MarkerstringAn optional pagination token provided by a previous request. If this parameter is specified, the response includes only records beyond the marker, up to the value specified by MaxRecords.
MaxRecordsintegerThe maximum number of records to include in the response. If more records exist than the specified MaxRecords value, a pagination token called a marker is included in the response so that the remaining results can be retrieved. Default: 100 Constraints: Minimum 20, maximum 100.
NewDBProxyNamestringThe new identifier for the DBProxy. An identifier must begin with a letter and must contain only ASCII letters, digits, and hyphens; it can't end with a hyphen or contain two consecutive hyphens.
RequireTLSbooleanWhether Transport Layer Security (TLS) encryption is required for connections to the proxy. By enabling this setting, you can enforce encrypted TLS connections to the proxy, even if the associated database doesn't use TLS.
RoleArnstringThe Amazon Resource Name (ARN) of the IAM role that the proxy uses to access secrets in Amazon Web Services Secrets Manager.
SecurityGroupsarrayThe new list of security groups for the DBProxy.
TagsarrayAn optional set of key-value pairs to associate arbitrary data of your choosing with the proxy.
TargetConnectionNetworkTypestringThe network type that the proxy uses to connect to the target database. The network type determines the IP version that the proxy uses for connections to the database. Valid values: IPV4 - The proxy connects to the database using IPv4 only. IPV6 - The proxy connects to the database using IPv6 only. Default: IPV4 Constraints: If you specify IPV6, the database must support dual-stack mode. RDS doesn't support IPv6-only databases. All targets registered with the proxy must be compatible with the specified network type.
VpcSecurityGroupIdsarrayOne or more VPC security group IDs to associate with the new proxy.

SELECT examples

Returns information about DB proxies.

SELECT
auth,
created_date,
db_proxy_arn,
db_proxy_name,
debug_logging,
default_auth_scheme,
endpoint,
endpoint_network_type,
engine_family,
idle_client_timeout,
require_tls,
role_arn,
status,
target_connection_network_type,
updated_date,
vpc_id,
vpc_security_group_ids,
vpc_subnet_ids
FROM aws.rds.db_proxies
WHERE region = '{{ region }}' -- required
AND DBProxyName = '{{ DBProxyName }}'
AND Filters = '{{ Filters }}'
AND Marker = '{{ Marker }}'
AND MaxRecords = '{{ MaxRecords }}'
;

INSERT examples

Creates a new DB proxy.

INSERT INTO aws.rds.db_proxies (
DBProxyName,
EngineFamily,
RoleArn,
VpcSubnetIds,
region,
DefaultAuthScheme,
Auth,
VpcSecurityGroupIds,
RequireTLS,
IdleClientTimeout,
DebugLogging,
Tags,
EndpointNetworkType,
TargetConnectionNetworkType
)
SELECT
'{{ DBProxyName }}',
'{{ EngineFamily }}',
'{{ RoleArn }}',
'{{ VpcSubnetIds }}',
'{{ region }}',
'{{ DefaultAuthScheme }}',
'{{ Auth }}',
'{{ VpcSecurityGroupIds }}',
'{{ RequireTLS }}',
'{{ IdleClientTimeout }}',
'{{ DebugLogging }}',
'{{ Tags }}',
'{{ EndpointNetworkType }}',
'{{ TargetConnectionNetworkType }}'
RETURNING
auth,
created_date,
db_proxy_arn,
db_proxy_name,
debug_logging,
default_auth_scheme,
endpoint,
endpoint_network_type,
engine_family,
idle_client_timeout,
require_tls,
role_arn,
status,
target_connection_network_type,
updated_date,
vpc_id,
vpc_security_group_ids,
vpc_subnet_ids
;

UPDATE examples

Changes the settings for an existing DB proxy.

UPDATE aws.rds.db_proxies
SET
-- No updatable properties
WHERE
DBProxyName = '{{ DBProxyName }}' --required
AND region = '{{ region }}' --required
AND NewDBProxyName = '{{ NewDBProxyName}}'
AND DefaultAuthScheme = '{{ DefaultAuthScheme}}'
AND Auth = '{{ Auth}}'
AND RequireTLS = {{ RequireTLS}}
AND IdleClientTimeout = '{{ IdleClientTimeout}}'
AND DebugLogging = {{ DebugLogging}}
AND RoleArn = '{{ RoleArn}}'
AND SecurityGroups = '{{ SecurityGroups}}'
RETURNING
auth,
created_date,
db_proxy_arn,
db_proxy_name,
debug_logging,
default_auth_scheme,
endpoint,
endpoint_network_type,
engine_family,
idle_client_timeout,
require_tls,
role_arn,
status,
target_connection_network_type,
updated_date,
vpc_id,
vpc_security_group_ids,
vpc_subnet_ids;

DELETE examples

Deletes an existing DB proxy.

DELETE FROM aws.rds.db_proxies
WHERE DBProxyName = '{{ DBProxyName }}' --required
AND region = '{{ region }}' --required
;