db_proxies
Creates, updates, deletes, gets or lists a db_proxies resource.
Overview
| Name | db_proxies |
| Type | Resource |
| Id | aws.rds.db_proxies |
Fields
The following fields are returned by SELECT queries:
- describe_db_proxies
| Name | Datatype | Description |
|---|---|---|
auth | string | One or more data structures specifying the authorization mechanism to connect to the associated RDS DB instance or Aurora DB cluster. |
created_date | string | The date and time when the proxy was first created. |
db_proxy_arn | string | The Amazon Resource Name (ARN) for the proxy. |
db_proxy_name | string | The 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_logging | boolean | Specifies 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_scheme | string | The 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. |
endpoint | string | The 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_type | string | The 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_family | string | The 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_timeout | integer | The 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_tls | boolean | Indicates whether Transport Layer Security (TLS) encryption is required for connections to the proxy. |
role_arn | string | The Amazon Resource Name (ARN) for the IAM role that the proxy uses to access Amazon Secrets Manager. |
status | string | The 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_type | string | The 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_date | string | The date and time when the proxy was last updated. |
vpc_id | string | Provides the VPC ID of the DB proxy. |
vpc_security_group_ids | string | Provides a list of VPC security groups that the proxy belongs to. |
vpc_subnet_ids | string | The EC2 subnet IDs for the proxy. |
Methods
The following methods are available for this resource:
| Name | Accessible by | Required Params | Optional Params | Description |
|---|---|---|---|---|
describe_db_proxies | select | region | DBProxyName, Filters, Marker, MaxRecords | Returns information about DB proxies. |
create_db_proxy | insert | DBProxyName, EngineFamily, RoleArn, VpcSubnetIds, region | DefaultAuthScheme, Auth, VpcSecurityGroupIds, RequireTLS, IdleClientTimeout, DebugLogging, Tags, EndpointNetworkType, TargetConnectionNetworkType | Creates a new DB proxy. |
modify_db_proxy | update | DBProxyName, region | NewDBProxyName, DefaultAuthScheme, Auth, RequireTLS, IdleClientTimeout, DebugLogging, RoleArn, SecurityGroups | Changes the settings for an existing DB proxy. |
delete_db_proxy | delete | DBProxyName, region | Deletes 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.
| Name | Datatype | Description |
|---|---|---|
DBProxyName | string | The name of the DB proxy to delete. |
EngineFamily | string | The 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. |
RoleArn | string | The Amazon Resource Name (ARN) of the IAM role that the proxy uses to access secrets in Amazon Web Services Secrets Manager. |
VpcSubnetIds | array | One or more VPC subnet IDs to associate with the new proxy. |
region | string | AWS region (default: us-east-1) |
Auth | array | The new authentication settings for the DBProxy. |
DBProxyName | string | The 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. |
DebugLogging | boolean | Specifies 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. |
DefaultAuthScheme | string | The 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. |
EndpointNetworkType | string | The 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. |
Filters | array | This parameter is not currently supported. |
IdleClientTimeout | integer | The 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. |
Marker | string | An 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. |
MaxRecords | integer | The 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. |
NewDBProxyName | string | The 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. |
RequireTLS | boolean | Whether 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. |
RoleArn | string | The Amazon Resource Name (ARN) of the IAM role that the proxy uses to access secrets in Amazon Web Services Secrets Manager. |
SecurityGroups | array | The new list of security groups for the DBProxy. |
Tags | array | An optional set of key-value pairs to associate arbitrary data of your choosing with the proxy. |
TargetConnectionNetworkType | string | The 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. |
VpcSecurityGroupIds | array | One or more VPC security group IDs to associate with the new proxy. |
SELECT examples
- describe_db_proxies
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
- create_db_proxy
- Manifest
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
;
# Description fields are for documentation purposes
- name: db_proxies
props:
- name: DBProxyName
value: "{{ DBProxyName }}"
description: Required parameter for the db_proxies resource.
- name: EngineFamily
value: "{{ EngineFamily }}"
description: Required parameter for the db_proxies resource.
- name: RoleArn
value: "{{ RoleArn }}"
description: Required parameter for the db_proxies resource.
- name: VpcSubnetIds
value: "{{ VpcSubnetIds }}"
description: Required parameter for the db_proxies resource.
- name: region
value: "{{ region }}"
description: Required parameter for the db_proxies resource.
- name: DefaultAuthScheme
value: "{{ DefaultAuthScheme }}"
description: The 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. If you don't specify DefaultAuthScheme or specify this parameter as NONE, you must specify the Auth option.
description: The 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. If you don't specify DefaultAuthScheme or specify this parameter as NONE, you must specify the Auth option.
- name: Auth
value: "{{ Auth }}"
description: The authorization mechanism that the proxy uses.
description: The authorization mechanism that the proxy uses.
- name: VpcSecurityGroupIds
value: "{{ VpcSecurityGroupIds }}"
description: One or more VPC security group IDs to associate with the new proxy.
description: One or more VPC security group IDs to associate with the new proxy.
- name: RequireTLS
value: {{ RequireTLS }}
description: Specifies whether 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.
description: Specifies whether 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.
- name: IdleClientTimeout
value: {{ IdleClientTimeout }}
description: The 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.
description: The 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.
- name: DebugLogging
value: {{ DebugLogging }}
description: Specifies 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.
description: Specifies 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.
- name: Tags
value: "{{ Tags }}"
description: An optional set of key-value pairs to associate arbitrary data of your choosing with the proxy.
description: An optional set of key-value pairs to associate arbitrary data of your choosing with the proxy.
- name: EndpointNetworkType
value: "{{ EndpointNetworkType }}"
description: The 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.
description: The 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.
- name: TargetConnectionNetworkType
value: "{{ TargetConnectionNetworkType }}"
description: The 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.
description: The 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.
UPDATE examples
- modify_db_proxy
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
- delete_db_proxy
Deletes an existing DB proxy.
DELETE FROM aws.rds.db_proxies
WHERE DBProxyName = '{{ DBProxyName }}' --required
AND region = '{{ region }}' --required
;