Skip to content

modify_db_proxy_target_group

modify_db_proxy_target_group(
    *,
    config_overrides: Optional[RDSClientConfig] = None,
    target_group_name: Optional[DBProxyTargetGroupName] = None,
    db_proxy_name: Optional[DBProxyName] = None,
    connection_pool_config: Optional[ConnectionPoolConfiguration] = None,
    new_name: Optional[String] = None,
) -> ModifyDBProxyTargetGroupResponse

Modifies the properties of a DBProxyTargetGroup.

Parameters:

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

    The name of the target group to modify.

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

    The name of the proxy.

  • connection_pool_config (Optional[ConnectionPoolConfiguration], default: None ) –

    The settings that determine the size and behavior of the connection pool for the target group.

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

    The new name for the modified DBProxyTarget. 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.

    You can't rename the default target group.

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 modify_db_proxy_target_group(
    self,
    *,
    config_overrides: Optional[RDSClientConfig] = None,
    target_group_name: Optional[
        "capo_rds.types.db_proxy_target_group_name.DBProxyTargetGroupName"
    ] = None,
    db_proxy_name: Optional["capo_rds.types.db_proxy_name.DBProxyName"] = None,
    connection_pool_config: Optional[
        "capo_rds.types.connection_pool_configuration.ConnectionPoolConfiguration"
    ] = None,
    new_name: Optional["capo_rds.types.string.String"] = None,
) -> "capo_rds.types.modify_db_proxy_target_group_response.ModifyDBProxyTargetGroupResponse":
    """<p>Modifies the properties of a <code>DBProxyTargetGroup</code>.</p>

    Args:
        target_group_name: <p>The name of the target group to modify.</p>
        db_proxy_name: <p>The name of the proxy.</p>
        connection_pool_config: <p>The settings that determine the size and behavior of the connection pool for the target group.</p>
        new_name: <p>The new name for the modified <code>DBProxyTarget</code>. 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.</p> <p>You can't rename the <code>default</code> target group.</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.modify_db_proxy_target_group_request.ModifyDBProxyTargetGroupRequest]",
    ) -> OperationResponse[
        "capo_rds.types.modify_db_proxy_target_group_response.ModifyDBProxyTargetGroupResponse"
    ]:
        import capo_rds._operations.amazon_rd_sv19.modify_db_proxy_target_group

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

    def _redact_input(
        input_: "capo_rds.types.modify_db_proxy_target_group_request.ModifyDBProxyTargetGroupRequest",
    ) -> dict[str, Any]:
        import capo_rds.types.modify_db_proxy_target_group_request

        return capo_rds.types.modify_db_proxy_target_group_request.redact_sensitive(
            input_
        )

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

        return (
            capo_rds.types.modify_db_proxy_target_group_response.redact_sensitive(
                output
            )
        )

    interceptors_, options_ = self.operation_options(
        config_overrides,
        OperationLogging(
            "ModifyDBProxyTargetGroup",
            redact_input=_redact_input,
            redact_output=_redact_output,
        ),
    )
    input_: capo_rds.types.modify_db_proxy_target_group_request.ModifyDBProxyTargetGroupRequest = {}
    if target_group_name is not None:
        input_["target_group_name"] = target_group_name
    if db_proxy_name is not None:
        input_["db_proxy_name"] = db_proxy_name
    if connection_pool_config is not None:
        input_["connection_pool_config"] = connection_pool_config
    if new_name is not None:
        input_["new_name"] = new_name

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