Skip to content

modify_db_proxy async

modify_db_proxy(
    *,
    config_overrides: Optional[AsyncRDSClientConfig] = None,
    db_proxy_name: Optional[DBProxyName] = None,
    new_db_proxy_name: Optional[DBProxyName] = None,
    default_auth_scheme: Optional[DefaultAuthScheme] = None,
    auth: Optional[UserAuthConfigList] = None,
    require_tls: Optional[BooleanOptional] = None,
    idle_client_timeout: Optional[IntegerOptional] = None,
    debug_logging: Optional[BooleanOptional] = None,
    role_arn: Optional[Arn] = None,
    security_groups: Optional[StringList] = None,
) -> ModifyDBProxyResponse

Changes the settings for an existing DB proxy.

Parameters:

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

    The identifier for the DBProxy to modify.

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

    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.

  • default_auth_scheme (Optional[DefaultAuthScheme], default: None ) –

    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.

  • auth (Optional[UserAuthConfigList], default: None ) –

    The new authentication settings for the DBProxy.

  • require_tls (Optional[BooleanOptional], default: None ) –

    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.

  • idle_client_timeout (Optional[IntegerOptional], default: None ) –

    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.

  • debug_logging (Optional[BooleanOptional], default: None ) –

    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.

  • role_arn (Optional[Arn], default: None ) –

    The Amazon Resource Name (ARN) of the IAM role that the proxy uses to access secrets in Amazon Web Services Secrets Manager.

  • security_groups (Optional[StringList], default: None ) –

    The new list of security groups for the DBProxy.

Raises:

  • DBProxyAlreadyExistsFault –

    The specified proxy name must be unique for all proxies owned by your Amazon Web Services account in the specified Amazon Web Services Region.

  • 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.

  • 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/async_rds.py
async def modify_db_proxy(
    self,
    *,
    config_overrides: Optional[AsyncRDSClientConfig] = None,
    db_proxy_name: Optional["capo_rds.types.db_proxy_name.DBProxyName"] = None,
    new_db_proxy_name: Optional["capo_rds.types.db_proxy_name.DBProxyName"] = None,
    default_auth_scheme: Optional[
        "capo_rds.types.default_auth_scheme.DefaultAuthScheme"
    ] = None,
    auth: Optional[
        "capo_rds.types.user_auth_config_list.UserAuthConfigList"
    ] = None,
    require_tls: Optional["capo_rds.types.boolean_optional.BooleanOptional"] = None,
    idle_client_timeout: Optional[
        "capo_rds.types.integer_optional.IntegerOptional"
    ] = None,
    debug_logging: Optional[
        "capo_rds.types.boolean_optional.BooleanOptional"
    ] = None,
    role_arn: Optional["capo_rds.types.arn.Arn"] = None,
    security_groups: Optional["capo_rds.types.string_list.StringList"] = None,
) -> "capo_rds.types.modify_db_proxy_response.ModifyDBProxyResponse":
    """<p>Changes the settings for an existing DB proxy.</p>

    Args:
        db_proxy_name: <p>The identifier for the <code>DBProxy</code> to modify.</p>
        new_db_proxy_name: <p>The new identifier for the <code>DBProxy</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>
        default_auth_scheme: <p>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 <code>NONE</code> and <code>IAM_AUTH</code>. When set to <code>IAM_AUTH</code>, the proxy uses end-to-end IAM authentication to connect to the database.</p>
        auth: <p>The new authentication settings for the <code>DBProxy</code>.</p>
        require_tls: <p>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.</p>
        idle_client_timeout: <p>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.</p>
        debug_logging: <p>Specifies whether the proxy logs detailed connection and query information. When you enable <code>DebugLogging</code>, 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.</p>
        role_arn: <p>The Amazon Resource Name (ARN) of the IAM role that the proxy uses to access secrets in Amazon Web Services Secrets Manager.</p>
        security_groups: <p>The new list of security groups for the <code>DBProxy</code>.</p>

    Raises:
        capo_rds.errors.db_proxy_already_exists_fault.DBProxyAlreadyExistsFault: <p>The specified proxy name must be unique for all proxies owned by your Amazon Web Services account in the specified Amazon Web Services Region.</p>
        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.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.
    """

    async def _handler(
        req: "AsyncOperationRequest[capo_rds.types.modify_db_proxy_request.ModifyDBProxyRequest]",
    ) -> AsyncOperationResponse[
        "capo_rds.types.modify_db_proxy_response.ModifyDBProxyResponse"
    ]:
        import capo_rds._operations.amazon_rd_sv19.modify_db_proxy

        (
            output,
            http_response,
        ) = await capo_rds._operations.amazon_rd_sv19.modify_db_proxy.async_modify_db_proxy(
            req.options, req.input
        )
        return AsyncOperationResponse(output=output, response=http_response)

    interceptors_, options_ = self.operation_options(
        config_overrides, OperationLogging("ModifyDBProxy")
    )
    input_: capo_rds.types.modify_db_proxy_request.ModifyDBProxyRequest = {}
    if db_proxy_name is not None:
        input_["db_proxy_name"] = db_proxy_name
    if new_db_proxy_name is not None:
        input_["new_db_proxy_name"] = new_db_proxy_name
    if default_auth_scheme is not None:
        input_["default_auth_scheme"] = default_auth_scheme
    if auth is not None:
        input_["auth"] = auth
    if require_tls is not None:
        input_["require_tls"] = require_tls
    if idle_client_timeout is not None:
        input_["idle_client_timeout"] = idle_client_timeout
    if debug_logging is not None:
        input_["debug_logging"] = debug_logging
    if role_arn is not None:
        input_["role_arn"] = role_arn
    if security_groups is not None:
        input_["security_groups"] = security_groups

    response = await aexecute_pipeline(
        AsyncOperationRequest(input=input_, options=options_),
        handler=_handler,
        interceptors=list(interceptors_),
    )
    await response.response.aclose()
    return response.output