Lists the endpoints for models from Amazon Bedrock Marketplace in your Amazon Web Services account.
Parameters:
-
max_results
(Optional[MaxResults], default:
None
)
–
The maximum number of results to return in a single call. If more results are available, the operation returns a NextToken value.
-
next_token
(Optional[PaginationToken], default:
None
)
–
The token for the next set of results. You receive this token from a previous ListMarketplaceModelEndpoints call.
-
model_source_equals
(Optional[ModelSourceIdentifier], default:
None
)
–
If specified, only endpoints for the given model source identifier are returned.
Raises:
Source code in docs_src/capo_bedrock/_services/bedrock.py
| def list_marketplace_model_endpoints(
self,
*,
config_overrides: Optional[BedrockClientConfig] = None,
max_results: Optional["capo_bedrock.types.max_results.MaxResults"] = None,
next_token: Optional[
"capo_bedrock.types.pagination_token.PaginationToken"
] = None,
model_source_equals: Optional[
"capo_bedrock.types.model_source_identifier.ModelSourceIdentifier"
] = None,
) -> "capo_bedrock.types.list_marketplace_model_endpoints_response.ListMarketplaceModelEndpointsResponse":
"""<p>Lists the endpoints for models from Amazon Bedrock Marketplace in your Amazon Web Services account.</p>
Args:
max_results: <p>The maximum number of results to return in a single call. If more results are available, the operation returns a <code>NextToken</code> value.</p>
next_token: <p>The token for the next set of results. You receive this token from a previous <code>ListMarketplaceModelEndpoints</code> call.</p>
model_source_equals: <p>If specified, only endpoints for the given model source identifier are returned.</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.resource_not_found_exception.ResourceNotFoundException: <p>The specified resource Amazon Resource Name (ARN) was not found. Check the Amazon Resource Name (ARN) and try your request again.</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.
"""
def _handler(
req: "OperationRequest[capo_bedrock.types.list_marketplace_model_endpoints_request.ListMarketplaceModelEndpointsRequest]",
) -> OperationResponse[
"capo_bedrock.types.list_marketplace_model_endpoints_response.ListMarketplaceModelEndpointsResponse"
]:
import capo_bedrock._operations.amazon_bedrock_control_plane_service.list_marketplace_model_endpoints
output, http_response = (
capo_bedrock._operations.amazon_bedrock_control_plane_service.list_marketplace_model_endpoints.list_marketplace_model_endpoints(
req.options, req.input
)
)
return OperationResponse(output=output, response=http_response)
interceptors_, options_ = self.operation_options(
config_overrides, OperationLogging("ListMarketplaceModelEndpoints")
)
input_: capo_bedrock.types.list_marketplace_model_endpoints_request.ListMarketplaceModelEndpointsRequest = {}
if max_results is not None:
input_["max_results"] = max_results
if next_token is not None:
input_["next_token"] = next_token
if model_source_equals is not None:
input_["model_source_equals"] = model_source_equals
response = execute_pipeline(
OperationRequest(input=input_, options=options_),
handler=_handler,
interceptors=list(interceptors_),
)
response.response.close()
return response.output
|