Skip to content

modify_db_cluster_endpoint async

modify_db_cluster_endpoint(
    *,
    config_overrides: Optional[AsyncRDSClientConfig] = None,
    db_cluster_endpoint_identifier: Optional[String] = None,
    endpoint_type: Optional[String] = None,
    static_members: Optional[StringList] = None,
    excluded_members: Optional[StringList] = None,
) -> DBClusterEndpoint

Modifies the properties of an endpoint in an Amazon Aurora DB cluster.

This operation only applies to Aurora DB clusters.

Parameters:

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

    The identifier of the endpoint to modify. This parameter is stored as a lowercase string.

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

    The type of the endpoint. One of: READER, WRITER, ANY.

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

    List of DB instance identifiers that are part of the custom endpoint group.

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

    List of DB instance identifiers that aren't part of the custom endpoint group. All other eligible instances are reachable through the custom endpoint. Only relevant if the list of static members is empty.

Raises:

Examples:

To modify a custom DB cluster endpoint The following example modifies the specified custom DB cluster endpoint.

>>> await client.modify_db_cluster_endpoint(db_cluster_endpoint_identifier='mycustomendpoint', static_members=['dbinstance1', 'dbinstance2', 'dbinstance3'])
Source code in docs_src/capo_rds/_services/async_rds.py
async def modify_db_cluster_endpoint(
    self,
    *,
    config_overrides: Optional[AsyncRDSClientConfig] = None,
    db_cluster_endpoint_identifier: Optional["capo_rds.types.string.String"] = None,
    endpoint_type: Optional["capo_rds.types.string.String"] = None,
    static_members: Optional["capo_rds.types.string_list.StringList"] = None,
    excluded_members: Optional["capo_rds.types.string_list.StringList"] = None,
) -> "capo_rds.types.db_cluster_endpoint.DBClusterEndpoint":
    """<p>Modifies the properties of an endpoint in an Amazon Aurora DB cluster.</p> <note> <p>This operation only applies to Aurora DB clusters.</p> </note>

    Args:
        db_cluster_endpoint_identifier: <p>The identifier of the endpoint to modify. This parameter is stored as a lowercase string.</p>
        endpoint_type: <p>The type of the endpoint. One of: <code>READER</code>, <code>WRITER</code>, <code>ANY</code>.</p>
        static_members: <p>List of DB instance identifiers that are part of the custom endpoint group.</p>
        excluded_members: <p>List of DB instance identifiers that aren't part of the custom endpoint group. All other eligible instances are reachable through the custom endpoint. Only relevant if the list of static members is empty.</p>

    Raises:
        capo_rds.errors.db_cluster_endpoint_not_found_fault.DBClusterEndpointNotFoundFault: <p>The specified custom endpoint doesn't exist.</p>
        capo_rds.errors.db_instance_not_found_fault.DBInstanceNotFoundFault: <p> <code>DBInstanceIdentifier</code> doesn't refer to an existing DB instance.</p>
        capo_rds.errors.invalid_db_cluster_endpoint_state_fault.InvalidDBClusterEndpointStateFault: <p>The requested operation can't be performed on the endpoint while the endpoint is in this state.</p>
        capo_rds.errors.invalid_db_cluster_state_fault.InvalidDBClusterStateFault: <p>The requested operation can't be performed while the cluster is in this state.</p>
        capo_rds.errors.invalid_db_instance_state_fault.InvalidDBInstanceStateFault: <p>The DB instance isn't in a valid state.</p>
        capo_rds.errors.UnknownServiceError: The service returned an error code this client does not model.

    Examples:
        To modify a custom DB cluster endpoint
        The following example modifies the specified custom DB cluster endpoint.

        >>> await client.modify_db_cluster_endpoint(db_cluster_endpoint_identifier='mycustomendpoint', static_members=['dbinstance1', 'dbinstance2', 'dbinstance3'])
    """

    async def _handler(
        req: "AsyncOperationRequest[capo_rds.types.modify_db_cluster_endpoint_message.ModifyDBClusterEndpointMessage]",
    ) -> AsyncOperationResponse[
        "capo_rds.types.db_cluster_endpoint.DBClusterEndpoint"
    ]:
        import capo_rds._operations.amazon_rd_sv19.modify_db_cluster_endpoint

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

    interceptors_, options_ = self.operation_options(
        config_overrides, OperationLogging("ModifyDBClusterEndpoint")
    )
    input_: capo_rds.types.modify_db_cluster_endpoint_message.ModifyDBClusterEndpointMessage = {}
    if db_cluster_endpoint_identifier is not None:
        input_["db_cluster_endpoint_identifier"] = db_cluster_endpoint_identifier
    if endpoint_type is not None:
        input_["endpoint_type"] = endpoint_type
    if static_members is not None:
        input_["static_members"] = static_members
    if excluded_members is not None:
        input_["excluded_members"] = excluded_members

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