create_connection
¶
create_connection(
name: ConnectionName,
authorization_type: ConnectionAuthorizationType,
auth_parameters: CreateConnectionAuthRequestParameters,
*,
config_overrides: Optional[EventBridgeClientConfig] = None,
description: Optional[ConnectionDescription] = None,
invocation_connectivity_parameters: Optional[ConnectivityResourceParameters] = None,
kms_key_identifier: Optional[KmsKeyIdentifier] = None,
) -> CreateConnectionResponse
Creates a connection. A connection defines the authorization type and credentials to use for authorization with an API destination HTTP endpoint.
For more information, see Connections for endpoint targets in the Amazon EventBridge User Guide.
Parameters:
-
name(ConnectionName) –The name for the connection to create.
-
description(Optional[ConnectionDescription], default:None) –A description for the connection to create.
-
authorization_type(ConnectionAuthorizationType) –The type of authorization to use for the connection.
OAUTH tokens are refreshed when a 401 or 407 response is returned.
-
auth_parameters(CreateConnectionAuthRequestParameters) –The authorization parameters to use to authorize with the endpoint.
You must include only authorization parameters for the
AuthorizationTypeyou specify. -
invocation_connectivity_parameters(Optional[ConnectivityResourceParameters], default:None) –For connections to private APIs, the parameters to use for invoking the API.
For more information, see Connecting to private APIs in the Amazon EventBridge User Guide .
-
kms_key_identifier(Optional[KmsKeyIdentifier], default:None) –The identifier of the KMS customer managed key for EventBridge to use, if you choose to use a customer managed key to encrypt this connection. The identifier can be the key Amazon Resource Name (ARN), KeyId, key alias, or key alias ARN.
If you do not specify a customer managed key identifier, EventBridge uses an Amazon Web Services owned key to encrypt the connection.
For more information, see Identify and view keys in the Key Management Service Developer Guide.
Raises:
-
AccessDeniedException–You do not have the necessary permissions for this action.
-
InternalException–This exception occurs due to unexpected causes.
-
LimitExceededException–The request failed because it attempted to create resource beyond the allowed service quota.
-
ResourceAlreadyExistsException–The resource you are trying to create already exists.
-
ResourceNotFoundException–An entity that you specified does not exist.
-
ThrottlingException–This request cannot be completed due to throttling issues.
-
UnknownServiceError–The service returned an error code this client does not model.
Source code in docs_src/capo_eventbridge/_services/event_bridge.py
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 598 599 600 601 602 603 604 605 606 607 608 609 610 611 612 613 614 615 616 617 618 619 620 621 622 623 624 625 626 627 628 629 630 631 632 633 634 635 636 637 638 639 640 | |