Lists your experiment templates.
Parameters:
-
max_results
(Optional[ListExperimentTemplatesMaxResults], default:
None
)
–
The maximum number of results to return with a single call. To retrieve the remaining results, make another call with the returned nextToken value.
-
next_token
(Optional[NextToken], default:
None
)
–
The token for the next page of results.
Raises:
-
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
| def list_experiment_templates(
self,
*,
config_overrides: Optional[fisClientConfig] = None,
max_results: Optional[
"capo_fis.types.list_experiment_templates_max_results.ListExperimentTemplatesMaxResults"
] = None,
next_token: Optional["capo_fis.types.next_token.NextToken"] = None,
) -> "capo_fis.types.list_experiment_templates_response.ListExperimentTemplatesResponse":
"""<p>Lists your experiment templates.</p>
Args:
max_results: <p>The maximum number of results to return with a single call. To retrieve the remaining results, make another call with the returned <code>nextToken</code> value.</p>
next_token: <p>The token for the next page of results.</p>
Raises:
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.list_experiment_templates_request.ListExperimentTemplatesRequest]",
) -> OperationResponse[
"capo_fis.types.list_experiment_templates_response.ListExperimentTemplatesResponse"
]:
import capo_fis._operations.fault_injection_simulator.list_experiment_templates
output, http_response = (
capo_fis._operations.fault_injection_simulator.list_experiment_templates.list_experiment_templates(
req.options, req.input
)
)
return OperationResponse(output=output, response=http_response)
interceptors_, options_ = self.operation_options(
config_overrides, OperationLogging("ListExperimentTemplates")
)
input_: capo_fis.types.list_experiment_templates_request.ListExperimentTemplatesRequest = {}
if max_results is not None:
input_["max_results"] = max_results
if next_token is not None:
input_["next_token"] = next_token
response = execute_pipeline(
OperationRequest(input=input_, options=options_),
handler=_handler,
interceptors=list(interceptors_),
)
response.response.close()
return response.output
|