Skip to content

update_marketplace_model_endpoint

update_marketplace_model_endpoint(
    endpoint_arn: Arn,
    endpoint_config: EndpointConfig,
    *,
    config_overrides: Optional[BedrockClientConfig] = None,
    client_request_token: Optional[IdempotencyToken] = None,
) -> UpdateMarketplaceModelEndpointResponse

Updates the configuration of an existing endpoint for a model from Amazon Bedrock Marketplace.

Parameters:

  • endpoint_arn (Arn) –

    The Amazon Resource Name (ARN) of the endpoint you want to update.

  • endpoint_config (EndpointConfig) –

    The new configuration for the endpoint, including the number and type of instances to use.

  • client_request_token (Optional[IdempotencyToken], default: None ) –

    A unique, case-sensitive identifier that you provide to ensure the idempotency of the request. This token is listed as not required because Amazon Web Services SDKs automatically generate it for you and set this parameter. If you're not using the Amazon Web Services SDK or the CLI, you must provide this token or the action will fail.

Raises:

Source code in docs_src/capo_bedrock/_services/bedrock.py
def update_marketplace_model_endpoint(
    self,
    endpoint_arn: "capo_bedrock.types.arn.Arn",
    endpoint_config: "capo_bedrock.types.endpoint_config.EndpointConfig",
    *,
    config_overrides: Optional[BedrockClientConfig] = None,
    client_request_token: Optional[
        "capo_bedrock.types.idempotency_token.IdempotencyToken"
    ] = None,
) -> "capo_bedrock.types.update_marketplace_model_endpoint_response.UpdateMarketplaceModelEndpointResponse":
    """<p>Updates the configuration of an existing endpoint for a model from Amazon Bedrock Marketplace.</p>

    Args:
        endpoint_arn: <p>The Amazon Resource Name (ARN) of the endpoint you want to update.</p>
        endpoint_config: <p>The new configuration for the endpoint, including the number and type of instances to use.</p>
        client_request_token: <p>A unique, case-sensitive identifier that you provide to ensure the idempotency of the request. This token is listed as not required because Amazon Web Services SDKs automatically generate it for you and set this parameter. If you're not using the Amazon Web Services SDK or the CLI, you must provide this token or the action will fail.</p>

    Raises:
        capo_bedrock.errors.access_denied_exception.AccessDeniedException: <p>The request is denied because of missing access permissions.</p>
        capo_bedrock.errors.conflict_exception.ConflictException: <p>Error occurred because of a conflict while performing an operation.</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_quota_exceeded_exception.ServiceQuotaExceededException: <p>The number of requests exceeds the service quota. Resubmit your request later.</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.update_marketplace_model_endpoint_request.UpdateMarketplaceModelEndpointRequest]",
    ) -> OperationResponse[
        "capo_bedrock.types.update_marketplace_model_endpoint_response.UpdateMarketplaceModelEndpointResponse"
    ]:
        import capo_bedrock._operations.amazon_bedrock_control_plane_service.update_marketplace_model_endpoint

        output, http_response = (
            capo_bedrock._operations.amazon_bedrock_control_plane_service.update_marketplace_model_endpoint.update_marketplace_model_endpoint(
                req.options, req.input
            )
        )
        return OperationResponse(output=output, response=http_response)

    interceptors_, options_ = self.operation_options(
        config_overrides, OperationLogging("UpdateMarketplaceModelEndpoint")
    )
    input_: capo_bedrock.types.update_marketplace_model_endpoint_request.UpdateMarketplaceModelEndpointRequest = {
        "endpoint_arn": endpoint_arn,
        "endpoint_config": endpoint_config,
    }
    if client_request_token is None:
        client_request_token = str(uuid.uuid4())
    input_["client_request_token"] = client_request_token

    response = execute_pipeline(
        OperationRequest(input=input_, options=options_),
        handler=_handler,
        interceptors=list(interceptors_),
    )
    response.response.close()
    return response.output