create_subscriber
async
¶
create_subscriber(
name: SubscriberName,
event_bus_arn: EventBusArn,
invoke_configuration: InvokeConfiguration,
*,
config_overrides: Optional[AsyncEventBridgeV2ClientConfig] = None,
description: Optional[Description] = None,
filter_configuration: Optional[FilterConfiguration] = None,
type: Optional[OrderingType] = None,
starting_position: Optional[StartingPosition] = None,
point_in_time_configuration: Optional[PointInTimeConfiguration] = 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,
state: Optional[SubscriberState] = None,
tags: Optional[TagMap] = None,
client_token: Optional[ClientToken] = None,
) -> CreateSubscriberResponse
Creates a subscriber on an event bus, which delivers matching events to the configured target. The bus must be ACTIVE. Retries carrying the same ClientToken are idempotent. A subscriber that targets an Amazon MSK cluster provisions its connectivity asynchronously after this call returns and begins delivering when its ConnectivityState reaches ACTIVE (see the MskSubscriberActive waiter).
Parameters:
-
name(SubscriberName) –Name of a subscriber. The first character must be alphanumeric; the remaining characters may also include '.', '-', and '_'.
-
event_bus_arn(EventBusArn) –The Amazon Resource Name (ARN) that uniquely identifies an event bus.
-
invoke_configuration(InvokeConfiguration) –Configuration for how the subscriber invokes its target.
-
description(Optional[Description], default:None) –Free-text description. Used by every resource type that has one: event buses, subscribers, and event sources.
-
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. -
type(Optional[OrderingType], default:None) –Delivery ordering mode of a subscriber: FIFO delivers events in order within an event group; UNORDERED delivers without an ordering guarantee.
-
starting_position(Optional[StartingPosition], default:None) –Starting position for a subscriber.
-
point_in_time_configuration(Optional[PointInTimeConfiguration], default:None) –Point-in-time configuration for a subscriber. Only applicable when StartingPosition is POINT_IN_TIME.
-
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.
-
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.
-
tags(Optional[TagMap], default:None) –Tags attached to a resource, as key-value pairs.
-
client_token(Optional[ClientToken], default:None) –Unique, case-sensitive identifier that ensures the idempotency of the request. The SDK generates one automatically when the field is omitted.
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.
-
IdempotentParameterMismatchException–The request reuses the client token of an earlier request with different parameters. Use a new client token, or resend the earlier request unchanged.
-
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.
-
ResourceAlreadyExistsException–A resource with the same name already exists.
-
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/async_event_bridge_v2.py
453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 581 582 583 584 585 586 587 588 589 590 591 592 593 594 595 596 597 | |