create_experiment_template
¶
create_experiment_template(
client_token: ClientToken,
description: ExperimentTemplateDescription,
stop_conditions: CreateExperimentTemplateStopConditionInputList,
actions: CreateExperimentTemplateActionInputMap,
role_arn: RoleArn,
*,
config_overrides: Optional[fisClientConfig] = None,
targets: Optional[CreateExperimentTemplateTargetInputMap] = None,
tags: Optional[TagMap] = None,
log_configuration: Optional[CreateExperimentTemplateLogConfigurationInput] = None,
experiment_options: Optional[CreateExperimentTemplateExperimentOptionsInput] = None,
experiment_report_configuration: Optional[
CreateExperimentTemplateReportConfigurationInput
] = None,
) -> CreateExperimentTemplateResponse
Creates an experiment template.
An experiment template includes the following components:
-
Targets: A target can be a specific resource in your Amazon Web Services environment, or one or more resources that match criteria that you specify, for example, resources that have specific tags.
-
Actions: The actions to carry out on the target. You can specify multiple actions, the duration of each action, and when to start each action during an experiment.
-
Stop conditions: If a stop condition is triggered while an experiment is running, the experiment is automatically stopped. You can define a stop condition as a CloudWatch alarm.
For more information, see experiment templates in the Fault Injection Service User Guide.
Parameters:
-
client_token(ClientToken) –Unique, case-sensitive identifier that you provide to ensure the idempotency of the request.
-
description(ExperimentTemplateDescription) –A description for the experiment template.
-
stop_conditions(CreateExperimentTemplateStopConditionInputList) –The stop conditions.
-
targets(Optional[CreateExperimentTemplateTargetInputMap], default:None) –The targets for the experiment.
-
actions(CreateExperimentTemplateActionInputMap) –The actions for the experiment.
-
role_arn(RoleArn) –The Amazon Resource Name (ARN) of an IAM role that grants the FIS service permission to perform service actions on your behalf.
-
tags(Optional[TagMap], default:None) –The tags to apply to the experiment template.
-
log_configuration(Optional[CreateExperimentTemplateLogConfigurationInput], default:None) –The configuration for experiment logging.
-
experiment_options(Optional[CreateExperimentTemplateExperimentOptionsInput], default:None) –The experiment options for the experiment template.
-
experiment_report_configuration(Optional[CreateExperimentTemplateReportConfigurationInput], default:None) –The experiment report configuration for the experiment template.
Raises:
-
ConflictException–The request could not be processed because of a conflict.
-
ResourceNotFoundException–The specified resource cannot be found.
-
ServiceQuotaExceededException–You have exceeded your service quota.
-
ValidationException–The specified input is not valid, or fails to satisfy the constraints for the request.
-
UnknownServiceError–The service returned an error code this client does not model.
Source code in docs_src/capo_fis/_services/fis.py
239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 | |