Registers an existing Amazon SageMaker endpoint with Amazon Bedrock Marketplace, allowing it to be used with Amazon Bedrock APIs.
Parameters:
-
endpoint_identifier
(Arn)
–
The ARN of the Amazon SageMaker endpoint you want to register with Amazon Bedrock Marketplace.
-
model_source_identifier
(ModelSourceIdentifier)
–
The ARN of the model from Amazon Bedrock Marketplace that is deployed on the endpoint.
Raises:
Source code in docs_src/capo_bedrock/_services/async_bedrock.py
| async def register_marketplace_model_endpoint(
self,
endpoint_identifier: "capo_bedrock.types.arn.Arn",
model_source_identifier: "capo_bedrock.types.model_source_identifier.ModelSourceIdentifier",
*,
config_overrides: Optional[AsyncBedrockClientConfig] = None,
) -> "capo_bedrock.types.register_marketplace_model_endpoint_response.RegisterMarketplaceModelEndpointResponse":
"""<p>Registers an existing Amazon SageMaker endpoint with Amazon Bedrock Marketplace, allowing it to be used with Amazon Bedrock APIs.</p>
Args:
endpoint_identifier: <p>The ARN of the Amazon SageMaker endpoint you want to register with Amazon Bedrock Marketplace.</p>
model_source_identifier: <p>The ARN of the model from Amazon Bedrock Marketplace that is deployed on the endpoint.</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.service_unavailable_exception.ServiceUnavailableException: <p>Returned if the service cannot complete the 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.register_marketplace_model_endpoint_request.RegisterMarketplaceModelEndpointRequest]",
) -> AsyncOperationResponse[
"capo_bedrock.types.register_marketplace_model_endpoint_response.RegisterMarketplaceModelEndpointResponse"
]:
import capo_bedrock._operations.amazon_bedrock_control_plane_service.register_marketplace_model_endpoint
(
output,
http_response,
) = await capo_bedrock._operations.amazon_bedrock_control_plane_service.register_marketplace_model_endpoint.async_register_marketplace_model_endpoint(
req.options, req.input
)
return AsyncOperationResponse(output=output, response=http_response)
interceptors_, options_ = self.operation_options(
config_overrides, OperationLogging("RegisterMarketplaceModelEndpoint")
)
input_: capo_bedrock.types.register_marketplace_model_endpoint_request.RegisterMarketplaceModelEndpointRequest = {
"endpoint_identifier": endpoint_identifier,
"model_source_identifier": model_source_identifier,
}
response = await aexecute_pipeline(
AsyncOperationRequest(input=input_, options=options_),
handler=_handler,
interceptors=list(interceptors_),
)
await response.response.aclose()
return response.output
|