Skip to content

update_message_template_metadata async

update_message_template_metadata(
    knowledge_base_id: UuidOrArn,
    message_template_id: UuidOrArnOrEitherWithQualifier,
    *,
    config_overrides: Optional[AsyncQConnectClientConfig] = None,
    name: Optional[Name] = None,
    description: Optional[Description] = None,
    grouping_configuration: Optional[GroupingConfiguration] = None,
) -> UpdateMessageTemplateMetadataResponse

Updates the Amazon Q in Connect message template metadata. Note that any modification to the message template’s name, description and grouping configuration will applied to the message template pointed by the $LATEST qualifier and all available versions. Partial update is supported. If any field is not supplied, it will remain unchanged for the message template.

Parameters:

  • knowledge_base_id (UuidOrArn) –

    The identifier of the knowledge base. Can be either the ID or the ARN. URLs cannot contain the ARN.

  • message_template_id (UuidOrArnOrEitherWithQualifier) –

    The identifier of the message template. Can be either the ID or the ARN. It cannot contain any qualifier.

  • name (Optional[Name], default: None ) –

    The name of the message template.

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

    The description of the message template.

Raises:

  • AccessDeniedException –

    You do not have sufficient access to perform this action.

  • ConflictException –

    The request could not be processed because of conflict in the current state of the resource. For example, if you're using a Create API (such as CreateAssistant) that accepts name, a conflicting resource (usually with the same name) is being created or mutated.

  • ResourceNotFoundException –

    The specified resource does not exist.

  • ThrottlingException –

    The throttling limit has been exceeded.

  • ValidationException –

    The input fails to satisfy the constraints specified by a service.

  • UnknownServiceError –

    The service returned an error code this client does not model.

Source code in docs_src/capo_qconnect/_services/async_q_connect.py
async def update_message_template_metadata(
    self,
    knowledge_base_id: "capo_qconnect.types.uuid_or_arn.UuidOrArn",
    message_template_id: "capo_qconnect.types.uuid_or_arn_or_either_with_qualifier.UuidOrArnOrEitherWithQualifier",
    *,
    config_overrides: Optional[AsyncQConnectClientConfig] = None,
    name: Optional["capo_qconnect.types.name.Name"] = None,
    description: Optional["capo_qconnect.types.description.Description"] = None,
    grouping_configuration: Optional[
        "capo_qconnect.types.grouping_configuration.GroupingConfiguration"
    ] = None,
) -> "capo_qconnect.types.update_message_template_metadata_response.UpdateMessageTemplateMetadataResponse":
    """<p>Updates the Amazon Q in Connect message template metadata. Note that any modification to the message template’s name, description and grouping configuration will applied to the message template pointed by the <code>$LATEST</code> qualifier and all available versions. Partial update is supported. If any field is not supplied, it will remain unchanged for the message template.</p>

    Args:
        knowledge_base_id: <p>The identifier of the knowledge base. Can be either the ID or the ARN. URLs cannot contain the ARN.</p>
        message_template_id: <p>The identifier of the message template. Can be either the ID or the ARN. It cannot contain any qualifier.</p>
        name: <p>The name of the message template.</p>
        description: <p>The description of the message template.</p>

    Raises:
        capo_qconnect.errors.access_denied_exception.AccessDeniedException: <p>You do not have sufficient access to perform this action.</p>
        capo_qconnect.errors.conflict_exception.ConflictException: <p>The request could not be processed because of conflict in the current state of the resource. For example, if you're using a <code>Create</code> API (such as <code>CreateAssistant</code>) that accepts name, a conflicting resource (usually with the same name) is being created or mutated.</p>
        capo_qconnect.errors.resource_not_found_exception.ResourceNotFoundException: <p>The specified resource does not exist.</p>
        capo_qconnect.errors.throttling_exception.ThrottlingException: <p>The throttling limit has been exceeded.</p>
        capo_qconnect.errors.validation_exception.ValidationException: <p>The input fails to satisfy the constraints specified by a service.</p>
        capo_qconnect.errors.UnknownServiceError: The service returned an error code this client does not model.
    """

    async def _handler(
        req: "AsyncOperationRequest[capo_qconnect.types.update_message_template_metadata_request.UpdateMessageTemplateMetadataRequest]",
    ) -> AsyncOperationResponse[
        "capo_qconnect.types.update_message_template_metadata_response.UpdateMessageTemplateMetadataResponse"
    ]:
        import capo_qconnect._operations.wisdom_service.update_message_template_metadata

        (
            output,
            http_response,
        ) = await capo_qconnect._operations.wisdom_service.update_message_template_metadata.async_update_message_template_metadata(
            req.options, req.input
        )
        return AsyncOperationResponse(output=output, response=http_response)

    def _redact_input(
        input_: "capo_qconnect.types.update_message_template_metadata_request.UpdateMessageTemplateMetadataRequest",
    ) -> dict[str, Any]:
        import capo_qconnect.types.update_message_template_metadata_request

        return capo_qconnect.types.update_message_template_metadata_request.redact_sensitive(
            input_
        )

    def _redact_output(
        output: "capo_qconnect.types.update_message_template_metadata_response.UpdateMessageTemplateMetadataResponse",
    ) -> dict[str, Any]:
        import capo_qconnect.types.update_message_template_metadata_response

        return capo_qconnect.types.update_message_template_metadata_response.redact_sensitive(
            output
        )

    interceptors_, options_ = self.operation_options(
        config_overrides,
        OperationLogging(
            "UpdateMessageTemplateMetadata",
            redact_input=_redact_input,
            redact_output=_redact_output,
        ),
    )
    input_: capo_qconnect.types.update_message_template_metadata_request.UpdateMessageTemplateMetadataRequest = {
        "knowledge_base_id": knowledge_base_id,
        "message_template_id": message_template_id,
    }
    if name is not None:
        input_["name"] = name
    if description is not None:
        input_["description"] = description
    if grouping_configuration is not None:
        input_["grouping_configuration"] = grouping_configuration

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