Skip to content

create_chime_webhook_configuration async

create_chime_webhook_configuration(
    webhook_description: ChimeWebhookDescription,
    webhook_url: ChimeWebhookUrl,
    sns_topic_arns: SnsTopicArnList,
    iam_role_arn: Arn,
    configuration_name: ConfigurationName,
    *,
    config_overrides: Optional[AsyncchatbotClientConfig] = None,
    logging_level: Optional[CustomerCwLogLevel] = None,
    tags: Optional[Tags] = None,
) -> CreateChimeWebhookConfigurationResult

Creates an AWS Chatbot configuration for Amazon Chime.

Parameters:

  • webhook_description (ChimeWebhookDescription) –

    A description of the webhook. We recommend using the convention RoomName/WebhookName.

    For more information, see Tutorial: Get started with Amazon Chime in the AWS Chatbot Administrator Guide.

  • webhook_url (ChimeWebhookUrl) –

    The URL for the Amazon Chime webhook.

  • sns_topic_arns (SnsTopicArnList) –

    The Amazon Resource Names (ARNs) of the SNS topics that deliver notifications to AWS Chatbot.

  • iam_role_arn (Arn) –

    A user-defined role that AWS Chatbot assumes. This is not the service-linked role.

    For more information, see IAM policies for AWS Chatbot in the AWS Chatbot Administrator Guide.

  • configuration_name (ConfigurationName) –

    The name of the configuration.

  • logging_level (Optional[CustomerCwLogLevel], default: None ) –

    Logging levels include ERROR, INFO, or NONE.

  • tags (Optional[Tags], default: None ) –

    A map of tags assigned to a resource. A tag is a string-to-string map of key-value pairs.

Raises:

Source code in docs_src/capo_chatbot/_services/async_chatbot.py
async def create_chime_webhook_configuration(
    self,
    webhook_description: "capo_chatbot.types.chime_webhook_description.ChimeWebhookDescription",
    webhook_url: "capo_chatbot.types.chime_webhook_url.ChimeWebhookUrl",
    sns_topic_arns: "capo_chatbot.types.sns_topic_arn_list.SnsTopicArnList",
    iam_role_arn: "capo_chatbot.types.arn.Arn",
    configuration_name: "capo_chatbot.types.configuration_name.ConfigurationName",
    *,
    config_overrides: Optional[AsyncchatbotClientConfig] = None,
    logging_level: Optional[
        "capo_chatbot.types.customer_cw_log_level.CustomerCwLogLevel"
    ] = None,
    tags: Optional["capo_chatbot.types.tags.Tags"] = None,
) -> "capo_chatbot.types.create_chime_webhook_configuration_result.CreateChimeWebhookConfigurationResult":
    """<p>Creates an AWS Chatbot configuration for Amazon Chime.</p>

    Args:
        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 Amazon Resource Names (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>
        configuration_name: <p>The name of the configuration.</p>
        logging_level: <p>Logging levels include <code>ERROR</code>, <code>INFO</code>, or <code>NONE</code>.</p>
        tags: <p>A map of tags assigned to a resource. A tag is a string-to-string map of key-value pairs.</p>

    Raises:
        capo_chatbot.errors.conflict_exception.ConflictException: <p>There was an issue processing your request.</p>
        capo_chatbot.errors.create_chime_webhook_configuration_exception.CreateChimeWebhookConfigurationException: <p>We can’t process your request right now because of a server issue. Try again later.</p>
        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.limit_exceeded_exception.LimitExceededException: <p>You have exceeded a service limit for AWS Chatbot.</p>
        capo_chatbot.errors.UnknownServiceError: The service returned an error code this client does not model.
    """

    async def _handler(
        req: "AsyncOperationRequest[capo_chatbot.types.create_chime_webhook_configuration_request.CreateChimeWebhookConfigurationRequest]",
    ) -> AsyncOperationResponse[
        "capo_chatbot.types.create_chime_webhook_configuration_result.CreateChimeWebhookConfigurationResult"
    ]:
        import capo_chatbot._operations.wheatley_orchestration_20171011.create_chime_webhook_configuration

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

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

        return capo_chatbot.types.create_chime_webhook_configuration_request.redact_sensitive(
            input_
        )

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

        return capo_chatbot.types.create_chime_webhook_configuration_result.redact_sensitive(
            output
        )

    interceptors_, options_ = self.operation_options(
        config_overrides,
        OperationLogging(
            "CreateChimeWebhookConfiguration",
            redact_input=_redact_input,
            redact_output=_redact_output,
        ),
    )
    input_: capo_chatbot.types.create_chime_webhook_configuration_request.CreateChimeWebhookConfigurationRequest = {
        "webhook_description": webhook_description,
        "webhook_url": webhook_url,
        "sns_topic_arns": sns_topic_arns,
        "iam_role_arn": iam_role_arn,
        "configuration_name": configuration_name,
    }
    if logging_level is not None:
        input_["logging_level"] = logging_level
    if tags is not None:
        input_["tags"] = tags

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