Skip to content

list_managed_job_templates async

list_managed_job_templates(
    *,
    config_overrides: Optional[AsyncIoTClientConfig] = None,
    template_name: Optional[ManagedJobTemplateName] = None,
    max_results: Optional[LaserMaxResults] = None,
    next_token: Optional[NextToken] = None,
) -> ListManagedJobTemplatesResponse

Returns a list of managed job templates.

Parameters:

  • template_name (Optional[ManagedJobTemplateName], default: None ) –

    An optional parameter for template name. If specified, only the versions of the managed job templates that have the specified template name will be returned.

  • max_results (Optional[LaserMaxResults], default: None ) –

    Maximum number of entries that can be returned.

  • next_token (Optional[NextToken], default: None ) –

    The token to retrieve the next set of results.

Raises:

Source code in docs_src/capo_iot/_services/async_io_t.py
async def list_managed_job_templates(
    self,
    *,
    config_overrides: Optional[AsyncIoTClientConfig] = None,
    template_name: Optional[
        "capo_iot.types.managed_job_template_name.ManagedJobTemplateName"
    ] = None,
    max_results: Optional[
        "capo_iot.types.laser_max_results.LaserMaxResults"
    ] = None,
    next_token: Optional["capo_iot.types.next_token.NextToken"] = None,
) -> "capo_iot.types.list_managed_job_templates_response.ListManagedJobTemplatesResponse":
    """<p>Returns a list of managed job templates.</p>

    Args:
        template_name: <p>An optional parameter for template name. If specified, only the versions of the managed job templates that have the specified template name will be returned.</p>
        max_results: <p>Maximum number of entries that can be returned.</p>
        next_token: <p>The token to retrieve the next set of results.</p>

    Raises:
        capo_iot.errors.internal_server_exception.InternalServerException: <p>Internal error from the service that indicates an unexpected error or that the service is unavailable.</p>
        capo_iot.errors.invalid_request_exception.InvalidRequestException: <p>The request is not valid.</p>
        capo_iot.errors.resource_not_found_exception.ResourceNotFoundException: <p>The specified resource does not exist.</p>
        capo_iot.errors.throttling_exception.ThrottlingException: <p>The rate exceeds the limit.</p>
        capo_iot.errors.UnknownServiceError: The service returned an error code this client does not model.
    """

    async def _handler(
        req: "AsyncOperationRequest[capo_iot.types.list_managed_job_templates_request.ListManagedJobTemplatesRequest]",
    ) -> AsyncOperationResponse[
        "capo_iot.types.list_managed_job_templates_response.ListManagedJobTemplatesResponse"
    ]:
        import capo_iot._operations.aws_iot_service.list_managed_job_templates

        (
            output,
            http_response,
        ) = await capo_iot._operations.aws_iot_service.list_managed_job_templates.async_list_managed_job_templates(
            req.options, req.input
        )
        return AsyncOperationResponse(output=output, response=http_response)

    interceptors_, options_ = self.operation_options(
        config_overrides, OperationLogging("ListManagedJobTemplates")
    )
    input_: capo_iot.types.list_managed_job_templates_request.ListManagedJobTemplatesRequest = {}
    if template_name is not None:
        input_["template_name"] = template_name
    if max_results is not None:
        input_["max_results"] = max_results
    if next_token is not None:
        input_["next_token"] = next_token

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