db_proxy_targets
Creates, updates, deletes, gets or lists a db_proxy_targets resource.
Overview
| Name | db_proxy_targets |
| Type | Resource |
| Id | aws.rds.db_proxy_targets |
Fields
The following fields are returned by SELECT queries:
- describe_db_proxy_targets
| Name | Datatype | Description |
|---|---|---|
endpoint | string | The writer endpoint for the RDS DB instance or Aurora DB cluster. |
port | integer | The port that the RDS Proxy uses to connect to the target RDS DB instance or Aurora DB cluster. |
rds_resource_id | string | The identifier representing the target. It can be the instance identifier for an RDS DB instance, or the cluster identifier for an Aurora DB cluster. |
role | string | A value that indicates whether the target of the proxy can be used for read/write or read-only operations. |
target_arn | string | The Amazon Resource Name (ARN) for the RDS DB instance or Aurora DB cluster. |
target_health | string | Information about the connection health of the RDS Proxy target. |
tracked_cluster_id | string | The DB cluster identifier when the target represents an Aurora DB cluster. This field is blank when the target represents an RDS DB instance. |
type | string | Specifies 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:
| Name | Accessible by | Required Params | Optional Params | Description |
|---|---|---|---|---|
describe_db_proxy_targets | select | DBProxyName, region | TargetGroupName, Filters, Marker, MaxRecords | Returns information about DBProxyTarget objects. This API supports pagination. |
register_db_proxy_targets | insert | DBProxyName, region | TargetGroupName, DBInstanceIdentifiers, DBClusterIdentifiers | Associate one or more DBProxyTarget data structures with a DBProxyTargetGroup. |
deregister_db_proxy_targets | delete | DBProxyName, region | TargetGroupName, DBInstanceIdentifiers, DBClusterIdentifiers | Remove 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.
| Name | Datatype | Description |
|---|---|---|
DBProxyName | string | The identifier of the DBProxy that is associated with the DBProxyTargetGroup. |
region | string | AWS region (default: us-east-1) |
DBClusterIdentifiers | array | One or more DB cluster identifiers. |
DBInstanceIdentifiers | array | One or more DB instance identifiers. |
Filters | array | This parameter is not currently supported. |
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. |
TargetGroupName | string | The identifier of the DBProxyTargetGroup. |
SELECT examples
- describe_db_proxy_targets
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
- register_db_proxy_targets
- Manifest
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
;
# Description fields are for documentation purposes
- name: db_proxy_targets
props:
- name: DBProxyName
value: "{{ DBProxyName }}"
description: Required parameter for the db_proxy_targets resource.
- name: region
value: "{{ region }}"
description: Required parameter for the db_proxy_targets resource.
- name: TargetGroupName
value: "{{ TargetGroupName }}"
description: The identifier of the DBProxyTargetGroup.
description: The identifier of the DBProxyTargetGroup.
- name: DBInstanceIdentifiers
value: "{{ DBInstanceIdentifiers }}"
description: One or more DB instance identifiers.
description: One or more DB instance identifiers.
- name: DBClusterIdentifiers
value: "{{ DBClusterIdentifiers }}"
description: One or more DB cluster identifiers.
description: One or more DB cluster identifiers.
DELETE examples
- deregister_db_proxy_targets
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 }}'
;