Skip to content

list_image_pipelines

list_image_pipelines(
    *,
    config_overrides: Optional[imagebuilderClientConfig] = None,
    filters: Optional[FilterList] = None,
    max_results: Optional[RestrictedInteger] = None,
    next_token: Optional[PaginationToken] = None,
) -> ListImagePipelinesResponse

Returns a list of image pipelines.

Parameters:

  • filters (Optional[FilterList], default: None ) –

    Use the following filters to streamline results:

    • description

    • distributionConfigurationArn

    • imageRecipeArn

    • infrastructureConfigurationArn

    • name

    • status

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

    The maximum number of items to return in a single request.

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

    A token to specify where to start paginating. Use the nextToken value from a previously truncated response.

Raises:

  • CallRateLimitExceededException –

    You have exceeded the permitted request rate for the Amazon EC2 APIs that Image Builder calls on your behalf. Retry with an increasing or variable delay between requests.

  • ClientException –

    A generic client error. This error usually indicates that the request failed a validation check, such as when a downstream service rejects a configured value.

  • ForbiddenException –

    You are not authorized to perform the requested operation.

  • InvalidPaginationTokenException –

    You have provided an invalid pagination token in your request.

  • InvalidRequestException –

    The request is malformed or otherwise invalid. Verify the request and try again.

  • ServiceException –

    An internal server error occurred while Image Builder processed the request. Retrying the request may succeed.

  • ServiceUnavailableException –

    The service is unable to process your request at this time.

  • UnknownServiceError –

    The service returned an error code this client does not model.

Examples:

List image pipelines filtered by name The following example lists the image pipelines in your account, using a filter to match a specific pipeline name.

>>> client.list_image_pipelines(filters=[{'name': 'name', 'values': ['my-example-pipeline']}])
Source code in docs_src/capo_imagebuilder/_services/imagebuilder.py
def list_image_pipelines(
    self,
    *,
    config_overrides: Optional[imagebuilderClientConfig] = None,
    filters: Optional["capo_imagebuilder.types.filter_list.FilterList"] = None,
    max_results: Optional[
        "capo_imagebuilder.types.restricted_integer.RestrictedInteger"
    ] = None,
    next_token: Optional[
        "capo_imagebuilder.types.pagination_token.PaginationToken"
    ] = None,
) -> "capo_imagebuilder.types.list_image_pipelines_response.ListImagePipelinesResponse":
    """<p>Returns a list of image pipelines.</p>

    Args:
        filters: <p>Use the following filters to streamline results:</p> <ul> <li> <p> <code>description</code> </p> </li> <li> <p> <code>distributionConfigurationArn</code> </p> </li> <li> <p> <code>imageRecipeArn</code> </p> </li> <li> <p> <code>infrastructureConfigurationArn</code> </p> </li> <li> <p> <code>name</code> </p> </li> <li> <p> <code>status</code> </p> </li> </ul>
        max_results: <p>The maximum number of items to return in a single request.</p>
        next_token: <p>A token to specify where to start paginating. Use the <code>nextToken</code> value from a previously truncated response.</p>

    Raises:
        capo_imagebuilder.errors.call_rate_limit_exceeded_exception.CallRateLimitExceededException: <p>You have exceeded the permitted request rate for the Amazon EC2 APIs that Image Builder calls on your behalf. Retry with an increasing or variable delay between requests.</p>
        capo_imagebuilder.errors.client_exception.ClientException: <p>A generic client error. This error usually indicates that the request failed a validation check, such as when a downstream service rejects a configured value.</p>
        capo_imagebuilder.errors.forbidden_exception.ForbiddenException: <p>You are not authorized to perform the requested operation.</p>
        capo_imagebuilder.errors.invalid_pagination_token_exception.InvalidPaginationTokenException: <p>You have provided an invalid pagination token in your request.</p>
        capo_imagebuilder.errors.invalid_request_exception.InvalidRequestException: <p>The request is malformed or otherwise invalid. Verify the request and try again.</p>
        capo_imagebuilder.errors.service_exception.ServiceException: <p>An internal server error occurred while Image Builder processed the request. Retrying the request may succeed.</p>
        capo_imagebuilder.errors.service_unavailable_exception.ServiceUnavailableException: <p>The service is unable to process your request at this time.</p>
        capo_imagebuilder.errors.UnknownServiceError: The service returned an error code this client does not model.

    Examples:
        List image pipelines filtered by name
        The following example lists the image pipelines in your account, using a filter to match a specific pipeline name.

        >>> client.list_image_pipelines(filters=[{'name': 'name', 'values': ['my-example-pipeline']}])
    """

    def _handler(
        req: "OperationRequest[capo_imagebuilder.types.list_image_pipelines_request.ListImagePipelinesRequest]",
    ) -> OperationResponse[
        "capo_imagebuilder.types.list_image_pipelines_response.ListImagePipelinesResponse"
    ]:
        import capo_imagebuilder._operations.imagebuilder.list_image_pipelines

        output, http_response = (
            capo_imagebuilder._operations.imagebuilder.list_image_pipelines.list_image_pipelines(
                req.options, req.input
            )
        )
        return OperationResponse(output=output, response=http_response)

    interceptors_, options_ = self.operation_options(
        config_overrides, OperationLogging("ListImagePipelines")
    )
    input_: capo_imagebuilder.types.list_image_pipelines_request.ListImagePipelinesRequest = {}
    if filters is not None:
        input_["filters"] = filters
    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