Skip to content

update_connection async

update_connection(
    name: ConnectionName,
    *,
    config_overrides: Optional[AsyncEventBridgeClientConfig] = None,
    description: Optional[ConnectionDescription] = None,
    authorization_type: Optional[ConnectionAuthorizationType] = None,
    auth_parameters: Optional[UpdateConnectionAuthRequestParameters] = None,
    invocation_connectivity_parameters: Optional[ConnectivityResourceParameters] = None,
    kms_key_identifier: Optional[KmsKeyIdentifier] = None,
) -> UpdateConnectionResponse

Updates settings for a connection.

Parameters:

  • name (ConnectionName) –

    The name of the connection to update.

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

    A description for the connection.

  • authorization_type (Optional[ConnectionAuthorizationType], default: None ) –

    The type of authorization to use for the connection.

  • auth_parameters (Optional[UpdateConnectionAuthRequestParameters], default: None ) –

    The authorization parameters to use for the connection.

  • 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:

Source code in docs_src/capo_eventbridge/_services/async_event_bridge.py
async def update_connection(
    self,
    name: "capo_eventbridge.types.connection_name.ConnectionName",
    *,
    config_overrides: Optional[AsyncEventBridgeClientConfig] = None,
    description: Optional[
        "capo_eventbridge.types.connection_description.ConnectionDescription"
    ] = None,
    authorization_type: Optional[
        "capo_eventbridge.types.connection_authorization_type.ConnectionAuthorizationType"
    ] = None,
    auth_parameters: Optional[
        "capo_eventbridge.types.update_connection_auth_request_parameters.UpdateConnectionAuthRequestParameters"
    ] = None,
    invocation_connectivity_parameters: Optional[
        "capo_eventbridge.types.connectivity_resource_parameters.ConnectivityResourceParameters"
    ] = None,
    kms_key_identifier: Optional[
        "capo_eventbridge.types.kms_key_identifier.KmsKeyIdentifier"
    ] = None,
) -> "capo_eventbridge.types.update_connection_response.UpdateConnectionResponse":
    """<p>Updates settings for a connection.</p>

    Args:
        name: <p>The name of the connection to update.</p>
        description: <p>A description for the connection.</p>
        authorization_type: <p>The type of authorization to use for the connection.</p>
        auth_parameters: <p>The authorization parameters to use for the connection.</p>
        invocation_connectivity_parameters: <p>For connections to private APIs, the parameters to use for invoking the API.</p> <p>For more information, see <a href="https://docs.aws.amazon.com/eventbridge/latest/userguide/connection-private.html">Connecting to private APIs</a> in the <i> <i>Amazon EventBridge User Guide</i> </i>.</p>
        kms_key_identifier: <p>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.</p> <p>If you do not specify a customer managed key identifier, EventBridge uses an Amazon Web Services owned key to encrypt the connection.</p> <p>For more information, see <a href="https://docs.aws.amazon.com/kms/latest/developerguide/viewing-keys.html">Identify and view keys</a> in the <i>Key Management Service Developer Guide</i>. </p>

    Raises:
        capo_eventbridge.errors.access_denied_exception.AccessDeniedException: <p>You do not have the necessary permissions for this action.</p>
        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.limit_exceeded_exception.LimitExceededException: <p>The request failed because it attempted to create resource beyond the allowed service quota.</p>
        capo_eventbridge.errors.resource_not_found_exception.ResourceNotFoundException: <p>An entity that you specified does not exist.</p>
        capo_eventbridge.errors.throttling_exception.ThrottlingException: <p>This request cannot be completed due to throttling issues.</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_connection_request.UpdateConnectionRequest]",
    ) -> AsyncOperationResponse[
        "capo_eventbridge.types.update_connection_response.UpdateConnectionResponse"
    ]:
        import capo_eventbridge._operations.aws_events.update_connection

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

    def _redact_input(
        input_: "capo_eventbridge.types.update_connection_request.UpdateConnectionRequest",
    ) -> dict[str, Any]:
        import capo_eventbridge.types.update_connection_request

        return capo_eventbridge.types.update_connection_request.redact_sensitive(
            input_
        )

    interceptors_, options_ = self.operation_options(
        config_overrides,
        OperationLogging("UpdateConnection", redact_input=_redact_input),
    )
    input_: capo_eventbridge.types.update_connection_request.UpdateConnectionRequest = {
        "name": name
    }
    if description is not None:
        input_["description"] = description
    if authorization_type is not None:
        input_["authorization_type"] = authorization_type
    if auth_parameters is not None:
        input_["auth_parameters"] = auth_parameters
    if invocation_connectivity_parameters is not None:
        input_["invocation_connectivity_parameters"] = (
            invocation_connectivity_parameters
        )
    if kms_key_identifier is not None:
        input_["kms_key_identifier"] = kms_key_identifier

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