Skip to content

describe_db_proxy_target_groups

describe_db_proxy_target_groups(
    *,
    config_overrides: Optional[RDSClientConfig] = None,
    db_proxy_name: Optional[DBProxyName] = None,
    target_group_name: Optional[DBProxyTargetGroupName] = None,
    filters: Optional[FilterList] = None,
    marker: Optional[String] = None,
    max_records: Optional[MaxRecords] = None,
) -> DescribeDBProxyTargetGroupsResponse

Returns information about DB proxy target groups, represented by DBProxyTargetGroup data structures.

Parameters:

  • db_proxy_name (Optional[DBProxyName], default: None ) –

    The identifier of the DBProxy associated with the target group.

  • target_group_name (Optional[DBProxyTargetGroupName], default: None ) –

    The identifier of the DBProxyTargetGroup to describe.

  • filters (Optional[FilterList], default: None ) –

    This parameter is not currently supported.

  • marker (Optional[String], default: None ) –

    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.

  • max_records (Optional[MaxRecords], default: None ) –

    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.

Raises:

  • DBProxyNotFoundFault –

    The specified proxy name doesn't correspond to a proxy owned by your Amazon Web Services account in the specified Amazon Web Services Region.

  • DBProxyTargetGroupNotFoundFault –

    The specified target group isn't available for a proxy owned by your Amazon Web Services account in the specified Amazon Web Services Region.

  • InvalidDBProxyStateFault –

    The requested operation can't be performed while the proxy is in this state.

  • UnknownServiceError –

    The service returned an error code this client does not model.

Source code in docs_src/capo_rds/_services/rds.py
def describe_db_proxy_target_groups(
    self,
    *,
    config_overrides: Optional[RDSClientConfig] = None,
    db_proxy_name: Optional["capo_rds.types.db_proxy_name.DBProxyName"] = None,
    target_group_name: Optional[
        "capo_rds.types.db_proxy_target_group_name.DBProxyTargetGroupName"
    ] = None,
    filters: Optional["capo_rds.types.filter_list.FilterList"] = None,
    marker: Optional["capo_rds.types.string.String"] = None,
    max_records: Optional["capo_rds.types.max_records.MaxRecords"] = None,
) -> "capo_rds.types.describe_db_proxy_target_groups_response.DescribeDBProxyTargetGroupsResponse":
    """<p>Returns information about DB proxy target groups, represented by <code>DBProxyTargetGroup</code> data structures.</p>

    Args:
        db_proxy_name: <p>The identifier of the <code>DBProxy</code> associated with the target group.</p>
        target_group_name: <p>The identifier of the <code>DBProxyTargetGroup</code> to describe.</p>
        filters: <p>This parameter is not currently supported.</p>
        marker: <p>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 <code>MaxRecords</code>.</p>
        max_records: <p>The maximum number of records to include in the response. If more records exist than the specified <code>MaxRecords</code> value, a pagination token called a marker is included in the response so that the remaining results can be retrieved.</p> <p>Default: 100</p> <p>Constraints: Minimum 20, maximum 100.</p>

    Raises:
        capo_rds.errors.db_proxy_not_found_fault.DBProxyNotFoundFault: <p>The specified proxy name doesn't correspond to a proxy owned by your Amazon Web Services account in the specified Amazon Web Services Region.</p>
        capo_rds.errors.db_proxy_target_group_not_found_fault.DBProxyTargetGroupNotFoundFault: <p>The specified target group isn't available for a proxy owned by your Amazon Web Services account in the specified Amazon Web Services Region.</p>
        capo_rds.errors.invalid_db_proxy_state_fault.InvalidDBProxyStateFault: <p>The requested operation can't be performed while the proxy is in this state.</p>
        capo_rds.errors.UnknownServiceError: The service returned an error code this client does not model.
    """

    def _handler(
        req: "OperationRequest[capo_rds.types.describe_db_proxy_target_groups_request.DescribeDBProxyTargetGroupsRequest]",
    ) -> OperationResponse[
        "capo_rds.types.describe_db_proxy_target_groups_response.DescribeDBProxyTargetGroupsResponse"
    ]:
        import capo_rds._operations.amazon_rd_sv19.describe_db_proxy_target_groups

        output, http_response = (
            capo_rds._operations.amazon_rd_sv19.describe_db_proxy_target_groups.describe_db_proxy_target_groups(
                req.options, req.input
            )
        )
        return OperationResponse(output=output, response=http_response)

    def _redact_output(
        output: "capo_rds.types.describe_db_proxy_target_groups_response.DescribeDBProxyTargetGroupsResponse",
    ) -> dict[str, Any]:
        import capo_rds.types.describe_db_proxy_target_groups_response

        return capo_rds.types.describe_db_proxy_target_groups_response.redact_sensitive(
            output
        )

    interceptors_, options_ = self.operation_options(
        config_overrides,
        OperationLogging(
            "DescribeDBProxyTargetGroups", redact_output=_redact_output
        ),
    )
    input_: capo_rds.types.describe_db_proxy_target_groups_request.DescribeDBProxyTargetGroupsRequest = {}
    if db_proxy_name is not None:
        input_["db_proxy_name"] = db_proxy_name
    if target_group_name is not None:
        input_["target_group_name"] = target_group_name
    if filters is not None:
        input_["filters"] = filters
    if marker is not None:
        input_["marker"] = marker
    if max_records is not None:
        input_["max_records"] = max_records

    response = execute_pipeline(
        OperationRequest(input=input_, options=options_),
        handler=_handler,
        interceptors=list(interceptors_),
    )
    response.response.close()
    return response.output