create_event_source
¶
create_event_source(
name: EventSourceName,
event_bus_arn: EventBusArn,
configuration: EventSourceConfiguration,
*,
config_overrides: Optional[EventBridgeV2ClientConfig] = None,
description: Optional[Description] = None,
tags: Optional[TagMap] = None,
client_token: Optional[ClientToken] = None,
) -> CreateEventSourceResponse
Creates an EventSource, which forwards events from an origin (an AWS service, a partner, or a third-party webhook provider) to an event bus. The event bus must be in the ACTIVE state. This operation is idempotent: retries that use the same ClientToken return the same result.
Parameters:
-
name(EventSourceName) –EventSource name. First character alphanumeric; the rest may add '.', '-', '_'. Names may not begin with the reserved "aws." prefix. The grammar matches the ARN local-name segment in EventSourceArn (event-sourcev2/<type>/<name>/<id>), mirroring EventBusName, so a name the ARN cannot represent cannot be created.
-
event_bus_arn(EventBusArn) –The Amazon Resource Name (ARN) that uniquely identifies an event bus.
-
configuration(EventSourceConfiguration) –Discriminated EventSource configuration. Exactly one variant must be set.
-
description(Optional[Description], default:None) –Free-text description. Used by every resource type that has one: event buses, subscribers, and event sources.
-
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/event_bridge_v2.py
347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 | |