Skip to content

update_review_template

update_review_template(
    template_arn: TemplateArn,
    *,
    config_overrides: Optional[WellArchitectedClientConfig] = None,
    template_name: Optional[TemplateName] = None,
    description: Optional[TemplateDescription] = None,
    notes: Optional[Notes] = None,
    lenses_to_associate: Optional[ReviewTemplateLensAliases] = None,
    lenses_to_disassociate: Optional[ReviewTemplateLensAliases] = None,
) -> UpdateReviewTemplateOutput

Update a review template.

Parameters:

Raises:

Source code in docs_src/capo_wellarchitected/_services/well_architected.py
def update_review_template(
    self,
    template_arn: "capo_wellarchitected.types.template_arn.TemplateArn",
    *,
    config_overrides: Optional[WellArchitectedClientConfig] = None,
    template_name: Optional[
        "capo_wellarchitected.types.template_name.TemplateName"
    ] = None,
    description: Optional[
        "capo_wellarchitected.types.template_description.TemplateDescription"
    ] = None,
    notes: Optional["capo_wellarchitected.types.notes.Notes"] = None,
    lenses_to_associate: Optional[
        "capo_wellarchitected.types.review_template_lens_aliases.ReviewTemplateLensAliases"
    ] = None,
    lenses_to_disassociate: Optional[
        "capo_wellarchitected.types.review_template_lens_aliases.ReviewTemplateLensAliases"
    ] = None,
) -> "capo_wellarchitected.types.update_review_template_output.UpdateReviewTemplateOutput":
    """<p>Update a review template.</p>

    Args:
        template_arn: <p>The review template ARN.</p>
        template_name: <p>The review template name.</p>
        description: <p>The review template description.</p>
        lenses_to_associate: <p>A list of lens aliases or ARNs to apply to the review template.</p>
        lenses_to_disassociate: <p>A list of lens aliases or ARNs to unapply to the review template. The <code>wellarchitected</code> lens cannot be unapplied.</p>

    Raises:
        capo_wellarchitected.errors.access_denied_exception.AccessDeniedException: <p>User does not have sufficient access to perform this action.</p>
        capo_wellarchitected.errors.conflict_exception.ConflictException: <p>The resource has already been processed, was deleted, or is too large.</p>
        capo_wellarchitected.errors.internal_server_exception.InternalServerException: <p>There is a problem with the Well-Architected Tool API service.</p>
        capo_wellarchitected.errors.resource_not_found_exception.ResourceNotFoundException: <p>The requested resource was not found.</p>
        capo_wellarchitected.errors.throttling_exception.ThrottlingException: <p>Request was denied due to request throttling.</p>
        capo_wellarchitected.errors.validation_exception.ValidationException: <p>The user input is not valid.</p>
        capo_wellarchitected.errors.UnknownServiceError: The service returned an error code this client does not model.
    """

    def _handler(
        req: "OperationRequest[capo_wellarchitected.types.update_review_template_input.UpdateReviewTemplateInput]",
    ) -> OperationResponse[
        "capo_wellarchitected.types.update_review_template_output.UpdateReviewTemplateOutput"
    ]:
        import capo_wellarchitected._operations.well_architected_api_service_lambda.update_review_template

        output, http_response = (
            capo_wellarchitected._operations.well_architected_api_service_lambda.update_review_template.update_review_template(
                req.options, req.input
            )
        )
        return OperationResponse(output=output, response=http_response)

    interceptors_, options_ = self.operation_options(
        config_overrides, OperationLogging("UpdateReviewTemplate")
    )
    input_: capo_wellarchitected.types.update_review_template_input.UpdateReviewTemplateInput = {
        "template_arn": template_arn
    }
    if template_name is not None:
        input_["template_name"] = template_name
    if description is not None:
        input_["description"] = description
    if notes is not None:
        input_["notes"] = notes
    if lenses_to_associate is not None:
        input_["lenses_to_associate"] = lenses_to_associate
    if lenses_to_disassociate is not None:
        input_["lenses_to_disassociate"] = lenses_to_disassociate

    response = execute_pipeline(
        OperationRequest(input=input_, options=options_),
        handler=_handler,
        interceptors=list(interceptors_),
    )
    response.response.close()
    return response.output