Skip to content

list_workflow_build_versions async

list_workflow_build_versions(
    *,
    config_overrides: Optional[AsyncimagebuilderClientConfig] = None,
    workflow_version_arn: Optional[WorkflowWildcardVersionArn] = None,
    max_results: Optional[RestrictedInteger] = None,
    next_token: Optional[PaginationToken] = None,
) -> ListWorkflowBuildVersionsResponse

Returns a list of build versions for a specific workflow resource.

Parameters:

  • workflow_version_arn (Optional[WorkflowWildcardVersionArn], default: None ) –

    The Amazon Resource Name (ARN) of the workflow resource for which to get a list of build versions. The version segments can contain wildcards (x) to match multiple versions of the workflow. If you don't specify an ARN, the response lists build versions for all of the workflows in your account.

  • 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 the build versions of a workflow The following example lists the build versions that exist for version 1.0.0 of the specified workflow, with the most recent build version first and the change description for each build version showing what changed.

>>> await client.list_workflow_build_versions(workflow_version_arn='arn:aws:imagebuilder:us-west-2:111122223333:workflow/build/my-example-workflow/1.0.0')
Source code in docs_src/capo_imagebuilder/_services/async_imagebuilder.py
async def list_workflow_build_versions(
    self,
    *,
    config_overrides: Optional[AsyncimagebuilderClientConfig] = None,
    workflow_version_arn: Optional[
        "capo_imagebuilder.types.workflow_wildcard_version_arn.WorkflowWildcardVersionArn"
    ] = 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_workflow_build_versions_response.ListWorkflowBuildVersionsResponse":
    """<p>Returns a list of build versions for a specific workflow resource.</p>

    Args:
        workflow_version_arn: <p>The Amazon Resource Name (ARN) of the workflow resource for which to get a list of build versions. The version segments can contain wildcards (<code>x</code>) to match multiple versions of the workflow. If you don't specify an ARN, the response lists build versions for all of the workflows in your account.</p>
        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 the build versions of a workflow
        The following example lists the build versions that exist for version 1.0.0 of the specified workflow, with the most recent build version first and the change description for each build version showing what changed.

        >>> await client.list_workflow_build_versions(workflow_version_arn='arn:aws:imagebuilder:us-west-2:111122223333:workflow/build/my-example-workflow/1.0.0')
    """

    async def _handler(
        req: "AsyncOperationRequest[capo_imagebuilder.types.list_workflow_build_versions_request.ListWorkflowBuildVersionsRequest]",
    ) -> AsyncOperationResponse[
        "capo_imagebuilder.types.list_workflow_build_versions_response.ListWorkflowBuildVersionsResponse"
    ]:
        import capo_imagebuilder._operations.imagebuilder.list_workflow_build_versions

        (
            output,
            http_response,
        ) = await capo_imagebuilder._operations.imagebuilder.list_workflow_build_versions.async_list_workflow_build_versions(
            req.options, req.input
        )
        return AsyncOperationResponse(output=output, response=http_response)

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