Skip to content

update_subscriber

update_subscriber(
    subscriber_arn: SubscriberArn,
    *,
    config_overrides: Optional[EventBridgeV2ClientConfig] = None,
    description: Optional[Description] = None,
    state: Optional[SubscriberState] = None,
    resume_position: Optional[ResumePosition] = None,
    invoke_configuration: Optional[UpdateInvokeConfiguration] = None,
    filter_configuration: Optional[FilterConfiguration] = None,
    batch_configuration: Optional[BatchConfiguration] = None,
    transformer: Optional[Transformer] = None,
    retry_policy: Optional[RetryPolicy] = None,
    on_failure_configuration: Optional[OnFailureConfiguration] = None,
    log_configuration: Optional[LogConfiguration] = None,
) -> UpdateSubscriberResponse

Updates a subscriber. Fields omitted from the request are left unchanged. Changing an Amazon MSK subscriber's connectivity can re-provision it; when it does, the subscriber resumes delivering once its ConnectivityState returns to ACTIVE (see the MskSubscriberActive waiter).

Parameters:

  • subscriber_arn (SubscriberArn) –

    The Amazon Resource Name (ARN) that uniquely identifies a subscriber.

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

    Free-text description. Used by every resource type that has one: event buses, subscribers, and event sources.

  • state (Optional[SubscriberState], default: None ) –

    Customer-controlled run state of a subscriber, set on create or update. Distinct from the bus lifecycle vocabulary, where ACTIVE means "provisioned and healthy". Delivery requires State RUNNING on a subscriber that is not revoked.

  • resume_position (Optional[ResumePosition], default: None ) –

    Position from which delivery resumes when a subscriber is unpaused. Honored only on an UpdateSubscriber call that transitions State from STOPPED to RUNNING (unpause); ignored on any other call and not accepted on Create. Defaults to LAST_PROCESSED when omitted.

  • invoke_configuration (Optional[UpdateInvokeConfiguration], default: None ) –

    Update-able configuration for how the subscriber invokes its target.

  • filter_configuration (Optional[FilterConfiguration], default: None ) –

    Configuration for filtering events delivered to a subscriber. On CreateSubscriber, Filters is required and must contain at least one Filter with a non-empty Pattern. On UpdateSubscriber, an empty FilterConfiguration:{} clears the existing filter. Any non-empty shape (including {Language:X} without Filters) must contain a valid Filters list — same contract as CreateSubscriber. A non-empty Filters list overwrites; an omitted FilterConfiguration preserves existing state. All Filters are implicitly ANDed — an event must match every Filter to be delivered.

  • batch_configuration (Optional[BatchConfiguration], default: None ) –

    Batching configuration for a subscriber.

  • transformer (Optional[Transformer], default: None ) –

    Transformer configuration for a subscriber.

  • retry_policy (Optional[RetryPolicy], default: None ) –

    Retry policy for a subscriber.

  • on_failure_configuration (Optional[OnFailureConfiguration], default: None ) –

    On-failure configuration: where a failed delivery is sent. Shared by the subscriber and the EventSource.

  • log_configuration (Optional[LogConfiguration], default: None ) –

    Log configuration for a subscriber.

Raises:

  • AccessDeniedException –

    The caller does not have the permissions required to perform the operation. This error is also returned when the operation cannot use the AWS KMS key for the event bus.

  • InternalException –

    The request failed because of an internal service error. Retry the request.

  • InvalidInputException –

    A request parameter is missing or not valid.

  • ThrottlingException –

    The request was throttled because it exceeds a request rate limit. Retry the request with backoff.

  • ConcurrentModificationException –

    Another change to the resource is already in progress. Retry the request.

  • InvalidStateException –

    The resource is not in a state that allows the operation. For example, an event bus that is still being created cannot accept events.

  • LimitExceededException –

    The request would exceed a service quota for the account.

  • ResourceNotFoundException –

    The resource does not exist.

  • UnknownServiceError –

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

Source code in docs_src/capo_eventbridgev2/_services/event_bridge_v2.py
def update_subscriber(
    self,
    subscriber_arn: "capo_eventbridgev2.types.subscriber_arn.SubscriberArn",
    *,
    config_overrides: Optional[EventBridgeV2ClientConfig] = None,
    description: Optional[
        "capo_eventbridgev2.types.description.Description"
    ] = None,
    state: Optional[
        "capo_eventbridgev2.types.subscriber_state.SubscriberState"
    ] = None,
    resume_position: Optional[
        "capo_eventbridgev2.types.resume_position.ResumePosition"
    ] = None,
    invoke_configuration: Optional[
        "capo_eventbridgev2.types.update_invoke_configuration.UpdateInvokeConfiguration"
    ] = None,
    filter_configuration: Optional[
        "capo_eventbridgev2.types.filter_configuration.FilterConfiguration"
    ] = None,
    batch_configuration: Optional[
        "capo_eventbridgev2.types.batch_configuration.BatchConfiguration"
    ] = None,
    transformer: Optional[
        "capo_eventbridgev2.types.transformer.Transformer"
    ] = None,
    retry_policy: Optional[
        "capo_eventbridgev2.types.retry_policy.RetryPolicy"
    ] = None,
    on_failure_configuration: Optional[
        "capo_eventbridgev2.types.on_failure_configuration.OnFailureConfiguration"
    ] = None,
    log_configuration: Optional[
        "capo_eventbridgev2.types.log_configuration.LogConfiguration"
    ] = None,
) -> "capo_eventbridgev2.types.update_subscriber_response.UpdateSubscriberResponse":
    """<p>Updates a subscriber. Fields omitted from the request are left unchanged. Changing an Amazon MSK subscriber's connectivity can re-provision it; when it does, the subscriber resumes delivering once its ConnectivityState returns to ACTIVE (see the MskSubscriberActive waiter).</p>

    Args:
        subscriber_arn: <p>The Amazon Resource Name (ARN) that uniquely identifies a subscriber.</p>
        description: <p>Free-text description. Used by every resource type that has one: event buses, subscribers, and event sources.</p>
        state: <p>Customer-controlled run state of a subscriber, set on create or update. Distinct from the bus lifecycle vocabulary, where ACTIVE means "provisioned and healthy". Delivery requires State RUNNING on a subscriber that is not revoked.</p>
        resume_position: <p>Position from which delivery resumes when a subscriber is unpaused. Honored only on an UpdateSubscriber call that transitions State from STOPPED to RUNNING (unpause); ignored on any other call and not accepted on Create. Defaults to LAST_PROCESSED when omitted.</p>
        invoke_configuration: <p>Update-able configuration for how the subscriber invokes its target.</p>
        filter_configuration: <p>Configuration for filtering events delivered to a subscriber. On CreateSubscriber, Filters is required and must contain at least one Filter with a non-empty Pattern. On UpdateSubscriber, an empty <code>FilterConfiguration:{}</code> clears the existing filter. Any non-empty shape (including <code>{Language:X}</code> without Filters) must contain a valid Filters list — same contract as CreateSubscriber. A non-empty Filters list overwrites; an omitted FilterConfiguration preserves existing state. All Filters are implicitly ANDed — an event must match every Filter to be delivered.</p>
        batch_configuration: <p>Batching configuration for a subscriber.</p>
        transformer: <p>Transformer configuration for a subscriber.</p>
        retry_policy: <p>Retry policy for a subscriber.</p>
        on_failure_configuration: <p>On-failure configuration: where a failed delivery is sent. Shared by the subscriber and the EventSource.</p>
        log_configuration: <p>Log configuration for a subscriber.</p>

    Raises:
        capo_eventbridgev2.errors.access_denied_exception.AccessDeniedException: <p>The caller does not have the permissions required to perform the operation. This error is also returned when the operation cannot use the AWS KMS key for the event bus.</p>
        capo_eventbridgev2.errors.internal_exception.InternalException: <p>The request failed because of an internal service error. Retry the request.</p>
        capo_eventbridgev2.errors.invalid_input_exception.InvalidInputException: <p>A request parameter is missing or not valid.</p>
        capo_eventbridgev2.errors.throttling_exception.ThrottlingException: <p>The request was throttled because it exceeds a request rate limit. Retry the request with backoff.</p>
        capo_eventbridgev2.errors.concurrent_modification_exception.ConcurrentModificationException: <p>Another change to the resource is already in progress. Retry the request.</p>
        capo_eventbridgev2.errors.invalid_state_exception.InvalidStateException: <p>The resource is not in a state that allows the operation. For example, an event bus that is still being created cannot accept events.</p>
        capo_eventbridgev2.errors.limit_exceeded_exception.LimitExceededException: <p>The request would exceed a service quota for the account.</p>
        capo_eventbridgev2.errors.resource_not_found_exception.ResourceNotFoundException: <p>The resource does not exist.</p>
        capo_eventbridgev2.errors.UnknownServiceError: The service returned an error code this client does not model.
    """

    def _handler(
        req: "OperationRequest[capo_eventbridgev2.types.update_subscriber_request.UpdateSubscriberRequest]",
    ) -> OperationResponse[
        "capo_eventbridgev2.types.update_subscriber_response.UpdateSubscriberResponse"
    ]:
        import capo_eventbridgev2._operations.aws_events_v2.update_subscriber

        output, http_response = (
            capo_eventbridgev2._operations.aws_events_v2.update_subscriber.update_subscriber(
                req.options, req.input
            )
        )
        return OperationResponse(output=output, response=http_response)

    def _redact_input(
        input_: "capo_eventbridgev2.types.update_subscriber_request.UpdateSubscriberRequest",
    ) -> dict[str, Any]:
        import capo_eventbridgev2.types.update_subscriber_request

        return capo_eventbridgev2.types.update_subscriber_request.redact_sensitive(
            input_
        )

    interceptors_, options_ = self.operation_options(
        config_overrides,
        OperationLogging("UpdateSubscriber", redact_input=_redact_input),
    )
    input_: capo_eventbridgev2.types.update_subscriber_request.UpdateSubscriberRequest = {
        "subscriber_arn": subscriber_arn
    }
    if description is not None:
        input_["description"] = description
    if state is not None:
        input_["state"] = state
    if resume_position is not None:
        input_["resume_position"] = resume_position
    if invoke_configuration is not None:
        input_["invoke_configuration"] = invoke_configuration
    if filter_configuration is not None:
        input_["filter_configuration"] = filter_configuration
    if batch_configuration is not None:
        input_["batch_configuration"] = batch_configuration
    if transformer is not None:
        input_["transformer"] = transformer
    if retry_policy is not None:
        input_["retry_policy"] = retry_policy
    if on_failure_configuration is not None:
        input_["on_failure_configuration"] = on_failure_configuration
    if log_configuration is not None:
        input_["log_configuration"] = log_configuration

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