Skip to content

update_experiment_template

update_experiment_template(
    id: ExperimentTemplateId,
    *,
    config_overrides: Optional[fisClientConfig] = None,
    description: Optional[ExperimentTemplateDescription] = None,
    stop_conditions: Optional[UpdateExperimentTemplateStopConditionInputList] = None,
    targets: Optional[UpdateExperimentTemplateTargetInputMap] = None,
    actions: Optional[UpdateExperimentTemplateActionInputMap] = None,
    role_arn: Optional[RoleArn] = None,
    log_configuration: Optional[UpdateExperimentTemplateLogConfigurationInput] = None,
    experiment_options: Optional[UpdateExperimentTemplateExperimentOptionsInput] = None,
    experiment_report_configuration: Optional[
        UpdateExperimentTemplateReportConfigurationInput
    ] = None,
) -> UpdateExperimentTemplateResponse

Updates the specified experiment template.

Parameters:

Raises:

Source code in docs_src/capo_fis/_services/fis.py
def update_experiment_template(
    self,
    id: "capo_fis.types.experiment_template_id.ExperimentTemplateId",
    *,
    config_overrides: Optional[fisClientConfig] = None,
    description: Optional[
        "capo_fis.types.experiment_template_description.ExperimentTemplateDescription"
    ] = None,
    stop_conditions: Optional[
        "capo_fis.types.update_experiment_template_stop_condition_input_list.UpdateExperimentTemplateStopConditionInputList"
    ] = None,
    targets: Optional[
        "capo_fis.types.update_experiment_template_target_input_map.UpdateExperimentTemplateTargetInputMap"
    ] = None,
    actions: Optional[
        "capo_fis.types.update_experiment_template_action_input_map.UpdateExperimentTemplateActionInputMap"
    ] = None,
    role_arn: Optional["capo_fis.types.role_arn.RoleArn"] = None,
    log_configuration: Optional[
        "capo_fis.types.update_experiment_template_log_configuration_input.UpdateExperimentTemplateLogConfigurationInput"
    ] = None,
    experiment_options: Optional[
        "capo_fis.types.update_experiment_template_experiment_options_input.UpdateExperimentTemplateExperimentOptionsInput"
    ] = None,
    experiment_report_configuration: Optional[
        "capo_fis.types.update_experiment_template_report_configuration_input.UpdateExperimentTemplateReportConfigurationInput"
    ] = None,
) -> "capo_fis.types.update_experiment_template_response.UpdateExperimentTemplateResponse":
    """<p>Updates the specified experiment template.</p>

    Args:
        id: <p>The ID of the experiment template.</p>
        description: <p>A description for the template.</p>
        stop_conditions: <p>The stop conditions for the experiment.</p>
        targets: <p>The targets for the experiment.</p>
        actions: <p>The actions for the experiment.</p>
        role_arn: <p>The Amazon Resource Name (ARN) of an IAM role that grants the FIS service permission to perform service actions on your behalf.</p>
        log_configuration: <p>The configuration for experiment logging.</p>
        experiment_options: <p>The experiment options for the experiment template.</p>
        experiment_report_configuration: <p>The experiment report configuration for the experiment template.</p>

    Raises:
        capo_fis.errors.resource_not_found_exception.ResourceNotFoundException: <p>The specified resource cannot be found.</p>
        capo_fis.errors.service_quota_exceeded_exception.ServiceQuotaExceededException: <p>You have exceeded your service quota.</p>
        capo_fis.errors.validation_exception.ValidationException: <p>The specified input is not valid, or fails to satisfy the constraints for the request.</p>
        capo_fis.errors.UnknownServiceError: The service returned an error code this client does not model.
    """

    def _handler(
        req: "OperationRequest[capo_fis.types.update_experiment_template_request.UpdateExperimentTemplateRequest]",
    ) -> OperationResponse[
        "capo_fis.types.update_experiment_template_response.UpdateExperimentTemplateResponse"
    ]:
        import capo_fis._operations.fault_injection_simulator.update_experiment_template

        output, http_response = (
            capo_fis._operations.fault_injection_simulator.update_experiment_template.update_experiment_template(
                req.options, req.input
            )
        )
        return OperationResponse(output=output, response=http_response)

    interceptors_, options_ = self.operation_options(
        config_overrides, OperationLogging("UpdateExperimentTemplate")
    )
    input_: capo_fis.types.update_experiment_template_request.UpdateExperimentTemplateRequest = {
        "id": id
    }
    if description is not None:
        input_["description"] = description
    if stop_conditions is not None:
        input_["stop_conditions"] = stop_conditions
    if targets is not None:
        input_["targets"] = targets
    if actions is not None:
        input_["actions"] = actions
    if role_arn is not None:
        input_["role_arn"] = role_arn
    if log_configuration is not None:
        input_["log_configuration"] = log_configuration
    if experiment_options is not None:
        input_["experiment_options"] = experiment_options
    if experiment_report_configuration is not None:
        input_["experiment_report_configuration"] = experiment_report_configuration

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