Skip to content

update_chime_webhook_configuration async

update_chime_webhook_configuration(
    chat_configuration_arn: ChatConfigurationArn,
    *,
    config_overrides: Optional[AsyncchatbotClientConfig] = None,
    webhook_description: Optional[ChimeWebhookDescription] = None,
    webhook_url: Optional[ChimeWebhookUrl] = None,
    sns_topic_arns: Optional[SnsTopicArnList] = None,
    iam_role_arn: Optional[Arn] = None,
    logging_level: Optional[CustomerCwLogLevel] = None,
) -> UpdateChimeWebhookConfigurationResult

Updates a Amazon Chime webhook configuration.

Parameters:

Raises:

Source code in docs_src/capo_chatbot/_services/async_chatbot.py
async def update_chime_webhook_configuration(
    self,
    chat_configuration_arn: "capo_chatbot.types.chat_configuration_arn.ChatConfigurationArn",
    *,
    config_overrides: Optional[AsyncchatbotClientConfig] = None,
    webhook_description: Optional[
        "capo_chatbot.types.chime_webhook_description.ChimeWebhookDescription"
    ] = None,
    webhook_url: Optional[
        "capo_chatbot.types.chime_webhook_url.ChimeWebhookUrl"
    ] = None,
    sns_topic_arns: Optional[
        "capo_chatbot.types.sns_topic_arn_list.SnsTopicArnList"
    ] = None,
    iam_role_arn: Optional["capo_chatbot.types.arn.Arn"] = None,
    logging_level: Optional[
        "capo_chatbot.types.customer_cw_log_level.CustomerCwLogLevel"
    ] = None,
) -> "capo_chatbot.types.update_chime_webhook_configuration_result.UpdateChimeWebhookConfigurationResult":
    """<p>Updates a Amazon Chime webhook configuration.</p>

    Args:
        chat_configuration_arn: <p>The Amazon Resource Name (ARN) of the ChimeWebhookConfiguration to update.</p>
        webhook_description: <p>A description of the webhook. We recommend using the convention <code>RoomName/WebhookName</code>.</p> <p>For more information, see <a href="https://docs.aws.amazon.com/chatbot/latest/adminguide/chime-setup.html">Tutorial: Get started with Amazon Chime</a> in the <i> AWS Chatbot Administrator Guide</i>. </p>
        webhook_url: <p>The URL for the Amazon Chime webhook.</p>
        sns_topic_arns: <p>The ARNs of the SNS topics that deliver notifications to AWS Chatbot.</p>
        iam_role_arn: <p>A user-defined role that AWS Chatbot assumes. This is not the service-linked role.</p> <p>For more information, see <a href="https://docs.aws.amazon.com/chatbot/latest/adminguide/chatbot-iam-policies.html">IAM policies for AWS Chatbot</a> in the <i> AWS Chatbot Administrator Guide</i>. </p>
        logging_level: <p>Logging levels include <code>ERROR</code>, <code>INFO</code>, or <code>NONE</code>.</p>

    Raises:
        capo_chatbot.errors.invalid_parameter_exception.InvalidParameterException: <p>Your request input doesn't meet the constraints required by AWS Chatbot.</p>
        capo_chatbot.errors.invalid_request_exception.InvalidRequestException: <p>Your request input doesn't meet the constraints required by AWS Chatbot.</p>
        capo_chatbot.errors.resource_not_found_exception.ResourceNotFoundException: <p>We were unable to find the resource for your request</p>
        capo_chatbot.errors.update_chime_webhook_configuration_exception.UpdateChimeWebhookConfigurationException: <p>We can’t process your request right now because of a server issue. Try again later.</p>
        capo_chatbot.errors.UnknownServiceError: The service returned an error code this client does not model.
    """

    async def _handler(
        req: "AsyncOperationRequest[capo_chatbot.types.update_chime_webhook_configuration_request.UpdateChimeWebhookConfigurationRequest]",
    ) -> AsyncOperationResponse[
        "capo_chatbot.types.update_chime_webhook_configuration_result.UpdateChimeWebhookConfigurationResult"
    ]:
        import capo_chatbot._operations.wheatley_orchestration_20171011.update_chime_webhook_configuration

        (
            output,
            http_response,
        ) = await capo_chatbot._operations.wheatley_orchestration_20171011.update_chime_webhook_configuration.async_update_chime_webhook_configuration(
            req.options, req.input
        )
        return AsyncOperationResponse(output=output, response=http_response)

    def _redact_input(
        input_: "capo_chatbot.types.update_chime_webhook_configuration_request.UpdateChimeWebhookConfigurationRequest",
    ) -> dict[str, Any]:
        import capo_chatbot.types.update_chime_webhook_configuration_request

        return capo_chatbot.types.update_chime_webhook_configuration_request.redact_sensitive(
            input_
        )

    def _redact_output(
        output: "capo_chatbot.types.update_chime_webhook_configuration_result.UpdateChimeWebhookConfigurationResult",
    ) -> dict[str, Any]:
        import capo_chatbot.types.update_chime_webhook_configuration_result

        return capo_chatbot.types.update_chime_webhook_configuration_result.redact_sensitive(
            output
        )

    interceptors_, options_ = self.operation_options(
        config_overrides,
        OperationLogging(
            "UpdateChimeWebhookConfiguration",
            redact_input=_redact_input,
            redact_output=_redact_output,
        ),
    )
    input_: capo_chatbot.types.update_chime_webhook_configuration_request.UpdateChimeWebhookConfigurationRequest = {
        "chat_configuration_arn": chat_configuration_arn
    }
    if webhook_description is not None:
        input_["webhook_description"] = webhook_description
    if webhook_url is not None:
        input_["webhook_url"] = webhook_url
    if sns_topic_arns is not None:
        input_["sns_topic_arns"] = sns_topic_arns
    if iam_role_arn is not None:
        input_["iam_role_arn"] = iam_role_arn
    if logging_level is not None:
        input_["logging_level"] = logging_level

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