Skip to content

list_test_templates async

list_test_templates(
    *, config_overrides: Optional[Asyncresiliencehubv2ClientConfig] = None
) -> ListTestTemplatesResponse

Lists the available resilience test templates. A test template is a pre-configured, AWS recommended test that defines which resilience capability to validate.

Raises:

Source code in docs_src/capo_resiliencehubv2/_services/async_resiliencehubv2.py
async def list_test_templates(
    self, *, config_overrides: Optional[Asyncresiliencehubv2ClientConfig] = None
) -> "capo_resiliencehubv2.types.list_test_templates_response.ListTestTemplatesResponse":
    """<p>Lists the available resilience test templates. A test template is a pre-configured, AWS recommended test that defines which resilience capability to validate.</p>

    Raises:
        capo_resiliencehubv2.errors.access_denied_exception.AccessDeniedException: <p>Access denied — caller lacks required permissions.</p>
        capo_resiliencehubv2.errors.internal_server_exception.InternalServerException: <p>Internal service error.</p>
        capo_resiliencehubv2.errors.validation_exception.ValidationException: <p>Validation error — invalid input parameters.</p>
        capo_resiliencehubv2.errors.UnknownServiceError: The service returned an error code this client does not model.
    """

    async def _handler(
        req: "AsyncOperationRequest[capo_resiliencehubv2.types.list_test_templates_request.ListTestTemplatesRequest]",
    ) -> AsyncOperationResponse[
        "capo_resiliencehubv2.types.list_test_templates_response.ListTestTemplatesResponse"
    ]:
        import capo_resiliencehubv2._operations.ngrh_service_core.list_test_templates

        (
            output,
            http_response,
        ) = await capo_resiliencehubv2._operations.ngrh_service_core.list_test_templates.async_list_test_templates(
            req.options, req.input
        )
        return AsyncOperationResponse(output=output, response=http_response)

    interceptors_, options_ = self.operation_options(
        config_overrides, OperationLogging("ListTestTemplates")
    )
    input_: capo_resiliencehubv2.types.list_test_templates_request.ListTestTemplatesRequest = {}

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