Skip to content

list_provisioned_model_throughputs async

list_provisioned_model_throughputs(
    *,
    config_overrides: Optional[AsyncBedrockClientConfig] = None,
    creation_time_after: Optional[Timestamp] = None,
    creation_time_before: Optional[Timestamp] = None,
    status_equals: Optional[ProvisionedModelStatus] = None,
    model_arn_equals: Optional[ModelArn] = None,
    name_contains: Optional[ProvisionedModelName] = None,
    max_results: Optional[MaxResults] = None,
    next_token: Optional[PaginationToken] = None,
    sort_by: Optional[SortByProvisionedModels] = None,
    sort_order: Optional[SortOrder] = None,
) -> ListProvisionedModelThroughputsResponse

Lists the Provisioned Throughputs in the account. For more information, see Provisioned Throughput in the Amazon Bedrock User Guide.

Parameters:

  • creation_time_after (Optional[Timestamp], default: None ) –

    A filter that returns Provisioned Throughputs created after the specified time.

  • creation_time_before (Optional[Timestamp], default: None ) –

    A filter that returns Provisioned Throughputs created before the specified time.

  • status_equals (Optional[ProvisionedModelStatus], default: None ) –

    A filter that returns Provisioned Throughputs if their statuses matches the value that you specify.

  • model_arn_equals (Optional[ModelArn], default: None ) –

    A filter that returns Provisioned Throughputs whose model Amazon Resource Name (ARN) is equal to the value that you specify.

  • name_contains (Optional[ProvisionedModelName], default: None ) –

    A filter that returns Provisioned Throughputs if their name contains the expression that you specify.

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

    THe maximum number of results to return in the response. If there are more results than the number you specified, the response returns a nextToken value. To see the next batch of results, send the nextToken value in another list request.

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

    If there are more results than the number you specified in the maxResults field, the response returns a nextToken value. To see the next batch of results, specify the nextToken value in this field.

  • sort_by (Optional[SortByProvisionedModels], default: None ) –

    The field by which to sort the returned list of Provisioned Throughputs.

  • sort_order (Optional[SortOrder], default: None ) –

    The sort order of the results.

Raises:

Source code in docs_src/capo_bedrock/_services/async_bedrock.py
async def list_provisioned_model_throughputs(
    self,
    *,
    config_overrides: Optional[AsyncBedrockClientConfig] = None,
    creation_time_after: Optional["capo_bedrock.types.timestamp.Timestamp"] = None,
    creation_time_before: Optional["capo_bedrock.types.timestamp.Timestamp"] = None,
    status_equals: Optional[
        "capo_bedrock.types.provisioned_model_status.ProvisionedModelStatus"
    ] = None,
    model_arn_equals: Optional["capo_bedrock.types.model_arn.ModelArn"] = None,
    name_contains: Optional[
        "capo_bedrock.types.provisioned_model_name.ProvisionedModelName"
    ] = None,
    max_results: Optional["capo_bedrock.types.max_results.MaxResults"] = None,
    next_token: Optional[
        "capo_bedrock.types.pagination_token.PaginationToken"
    ] = None,
    sort_by: Optional[
        "capo_bedrock.types.sort_by_provisioned_models.SortByProvisionedModels"
    ] = None,
    sort_order: Optional["capo_bedrock.types.sort_order.SortOrder"] = None,
) -> "capo_bedrock.types.list_provisioned_model_throughputs_response.ListProvisionedModelThroughputsResponse":
    """<p>Lists the Provisioned Throughputs in the account. For more information, see <a href="https://docs.aws.amazon.com/bedrock/latest/userguide/prov-throughput.html">Provisioned Throughput</a> in the <a href="https://docs.aws.amazon.com/bedrock/latest/userguide/what-is-service.html">Amazon Bedrock User Guide</a>.</p>

    Args:
        creation_time_after: <p>A filter that returns Provisioned Throughputs created after the specified time. </p>
        creation_time_before: <p>A filter that returns Provisioned Throughputs created before the specified time. </p>
        status_equals: <p>A filter that returns Provisioned Throughputs if their statuses matches the value that you specify.</p>
        model_arn_equals: <p>A filter that returns Provisioned Throughputs whose model Amazon Resource Name (ARN) is equal to the value that you specify.</p>
        name_contains: <p>A filter that returns Provisioned Throughputs if their name contains the expression that you specify.</p>
        max_results: <p>THe maximum number of results to return in the response. If there are more results than the number you specified, the response returns a <code>nextToken</code> value. To see the next batch of results, send the <code>nextToken</code> value in another list request.</p>
        next_token: <p>If there are more results than the number you specified in the <code>maxResults</code> field, the response returns a <code>nextToken</code> value. To see the next batch of results, specify the <code>nextToken</code> value in this field.</p>
        sort_by: <p>The field by which to sort the returned list of Provisioned Throughputs.</p>
        sort_order: <p>The sort order of the results.</p>

    Raises:
        capo_bedrock.errors.access_denied_exception.AccessDeniedException: <p>The request is denied because of missing access permissions.</p>
        capo_bedrock.errors.internal_server_exception.InternalServerException: <p>An internal server error occurred. Retry your request.</p>
        capo_bedrock.errors.throttling_exception.ThrottlingException: <p>The number of requests exceeds the limit. Resubmit your request later.</p>
        capo_bedrock.errors.validation_exception.ValidationException: <p>Input validation failed. Check your request parameters and retry the request.</p>
        capo_bedrock.errors.UnknownServiceError: The service returned an error code this client does not model.
    """

    async def _handler(
        req: "AsyncOperationRequest[capo_bedrock.types.list_provisioned_model_throughputs_request.ListProvisionedModelThroughputsRequest]",
    ) -> AsyncOperationResponse[
        "capo_bedrock.types.list_provisioned_model_throughputs_response.ListProvisionedModelThroughputsResponse"
    ]:
        import capo_bedrock._operations.amazon_bedrock_control_plane_service.list_provisioned_model_throughputs

        (
            output,
            http_response,
        ) = await capo_bedrock._operations.amazon_bedrock_control_plane_service.list_provisioned_model_throughputs.async_list_provisioned_model_throughputs(
            req.options, req.input
        )
        return AsyncOperationResponse(output=output, response=http_response)

    interceptors_, options_ = self.operation_options(
        config_overrides, OperationLogging("ListProvisionedModelThroughputs")
    )
    input_: capo_bedrock.types.list_provisioned_model_throughputs_request.ListProvisionedModelThroughputsRequest = {}
    if creation_time_after is not None:
        input_["creation_time_after"] = creation_time_after
    if creation_time_before is not None:
        input_["creation_time_before"] = creation_time_before
    if status_equals is not None:
        input_["status_equals"] = status_equals
    if model_arn_equals is not None:
        input_["model_arn_equals"] = model_arn_equals
    if name_contains is not None:
        input_["name_contains"] = name_contains
    if max_results is not None:
        input_["max_results"] = max_results
    if next_token is not None:
        input_["next_token"] = next_token
    if sort_by is not None:
        input_["sort_by"] = sort_by
    if sort_order is not None:
        input_["sort_order"] = sort_order

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