Skip to main content

db_proxy_targets

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

Overview

Namedb_proxy_targets
TypeResource
Idaws.rds.db_proxy_targets

Fields

The following fields are returned by SELECT queries:

NameDatatypeDescription
endpointstringThe writer endpoint for the RDS DB instance or Aurora DB cluster.
portintegerThe port that the RDS Proxy uses to connect to the target RDS DB instance or Aurora DB cluster.
rds_resource_idstringThe identifier representing the target. It can be the instance identifier for an RDS DB instance, or the cluster identifier for an Aurora DB cluster.
rolestringA value that indicates whether the target of the proxy can be used for read/write or read-only operations.
target_arnstringThe Amazon Resource Name (ARN) for the RDS DB instance or Aurora DB cluster.
target_healthstringInformation about the connection health of the RDS Proxy target.
tracked_cluster_idstringThe DB cluster identifier when the target represents an Aurora DB cluster. This field is blank when the target represents an RDS DB instance.
typestringSpecifies the kind of database, such as an RDS DB instance or an Aurora DB cluster, that the target represents.

Methods

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
describe_db_proxy_targetsselectDBProxyName, regionTargetGroupName, Filters, Marker, MaxRecordsReturns information about DBProxyTarget objects. This API supports pagination.
register_db_proxy_targetsinsertDBProxyName, regionTargetGroupName, DBInstanceIdentifiers, DBClusterIdentifiersAssociate one or more DBProxyTarget data structures with a DBProxyTargetGroup.
deregister_db_proxy_targetsdeleteDBProxyName, regionTargetGroupName, DBInstanceIdentifiers, DBClusterIdentifiersRemove the association between one or more DBProxyTarget data structures and a DBProxyTargetGroup.

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 identifier of the DBProxy that is associated with the DBProxyTargetGroup.
regionstringAWS region (default: us-east-1)
DBClusterIdentifiersarrayOne or more DB cluster identifiers.
DBInstanceIdentifiersarrayOne or more DB instance identifiers.
FiltersarrayThis parameter is not currently supported.
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.
TargetGroupNamestringThe identifier of the DBProxyTargetGroup.

SELECT examples

Returns information about DBProxyTarget objects. This API supports pagination.

SELECT
endpoint,
port,
rds_resource_id,
role,
target_arn,
target_health,
tracked_cluster_id,
type
FROM aws.rds.db_proxy_targets
WHERE DBProxyName = '{{ DBProxyName }}' -- required
AND region = '{{ region }}' -- required
AND TargetGroupName = '{{ TargetGroupName }}'
AND Filters = '{{ Filters }}'
AND Marker = '{{ Marker }}'
AND MaxRecords = '{{ MaxRecords }}'
;

INSERT examples

Associate one or more DBProxyTarget data structures with a DBProxyTargetGroup.

INSERT INTO aws.rds.db_proxy_targets (
DBProxyName,
region,
TargetGroupName,
DBInstanceIdentifiers,
DBClusterIdentifiers
)
SELECT
'{{ DBProxyName }}',
'{{ region }}',
'{{ TargetGroupName }}',
'{{ DBInstanceIdentifiers }}',
'{{ DBClusterIdentifiers }}'
RETURNING
endpoint,
port,
rds_resource_id,
role,
target_arn,
target_health,
tracked_cluster_id,
type
;

DELETE examples

Remove the association between one or more DBProxyTarget data structures and a DBProxyTargetGroup.

DELETE FROM aws.rds.db_proxy_targets
WHERE DBProxyName = '{{ DBProxyName }}' --required
AND region = '{{ region }}' --required
AND TargetGroupName = '{{ TargetGroupName }}'
AND DBInstanceIdentifiers = '{{ DBInstanceIdentifiers }}'
AND DBClusterIdentifiers = '{{ DBClusterIdentifiers }}'
;