Skip to content

update_endpoint async

update_endpoint(
    name: EndpointName,
    *,
    config_overrides: Optional[AsyncEventBridgeClientConfig] = None,
    description: Optional[EndpointDescription] = None,
    routing_config: Optional[RoutingConfig] = None,
    replication_config: Optional[ReplicationConfig] = None,
    event_buses: Optional[EndpointEventBusList] = None,
    role_arn: Optional[IamRoleArn] = None,
) -> UpdateEndpointResponse

Update an existing endpoint. For more information about global endpoints, see Making applications Regional-fault tolerant with global endpoints and event replication in the Amazon EventBridge User Guide .

Parameters:

  • name (EndpointName) –

    The name of the endpoint you want to update.

  • description (Optional[EndpointDescription], default: None ) –

    A description for the endpoint.

  • routing_config (Optional[RoutingConfig], default: None ) –

    Configure the routing policy, including the health check and secondary Region.

  • replication_config (Optional[ReplicationConfig], default: None ) –

    Whether event replication was enabled or disabled by this request.

  • event_buses (Optional[EndpointEventBusList], default: None ) –

    Define event buses used for replication.

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

    The ARN of the role used by event replication for this request.

Raises:

Source code in docs_src/capo_eventbridge/_services/async_event_bridge.py
async def update_endpoint(
    self,
    name: "capo_eventbridge.types.endpoint_name.EndpointName",
    *,
    config_overrides: Optional[AsyncEventBridgeClientConfig] = None,
    description: Optional[
        "capo_eventbridge.types.endpoint_description.EndpointDescription"
    ] = None,
    routing_config: Optional[
        "capo_eventbridge.types.routing_config.RoutingConfig"
    ] = None,
    replication_config: Optional[
        "capo_eventbridge.types.replication_config.ReplicationConfig"
    ] = None,
    event_buses: Optional[
        "capo_eventbridge.types.endpoint_event_bus_list.EndpointEventBusList"
    ] = None,
    role_arn: Optional["capo_eventbridge.types.iam_role_arn.IamRoleArn"] = None,
) -> "capo_eventbridge.types.update_endpoint_response.UpdateEndpointResponse":
    """<p>Update an existing endpoint. For more information about global endpoints, see <a href="https://docs.aws.amazon.com/eventbridge/latest/userguide/eb-global-endpoints.html">Making applications Regional-fault tolerant with global endpoints and event replication</a> in the <i> <i>Amazon EventBridge User Guide</i> </i>.</p>

    Args:
        name: <p>The name of the endpoint you want to update.</p>
        description: <p>A description for the endpoint.</p>
        routing_config: <p>Configure the routing policy, including the health check and secondary Region.</p>
        replication_config: <p>Whether event replication was enabled or disabled by this request.</p>
        event_buses: <p>Define event buses used for replication.</p>
        role_arn: <p>The ARN of the role used by event replication for this request.</p>

    Raises:
        capo_eventbridge.errors.concurrent_modification_exception.ConcurrentModificationException: <p>There is concurrent modification on a rule, target, archive, or replay.</p>
        capo_eventbridge.errors.internal_exception.InternalException: <p>This exception occurs due to unexpected causes.</p>
        capo_eventbridge.errors.resource_not_found_exception.ResourceNotFoundException: <p>An entity that you specified does not exist.</p>
        capo_eventbridge.errors.UnknownServiceError: The service returned an error code this client does not model.
    """

    async def _handler(
        req: "AsyncOperationRequest[capo_eventbridge.types.update_endpoint_request.UpdateEndpointRequest]",
    ) -> AsyncOperationResponse[
        "capo_eventbridge.types.update_endpoint_response.UpdateEndpointResponse"
    ]:
        import capo_eventbridge._operations.aws_events.update_endpoint

        (
            output,
            http_response,
        ) = await capo_eventbridge._operations.aws_events.update_endpoint.async_update_endpoint(
            req.options, req.input
        )
        return AsyncOperationResponse(output=output, response=http_response)

    interceptors_, options_ = self.operation_options(
        config_overrides, OperationLogging("UpdateEndpoint")
    )
    input_: capo_eventbridge.types.update_endpoint_request.UpdateEndpointRequest = {
        "name": name
    }
    if description is not None:
        input_["description"] = description
    if routing_config is not None:
        input_["routing_config"] = routing_config
    if replication_config is not None:
        input_["replication_config"] = replication_config
    if event_buses is not None:
        input_["event_buses"] = event_buses
    if role_arn is not None:
        input_["role_arn"] = role_arn

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