create_endpoint
¶
create_endpoint(
endpoint_name: ComprehendEndpointName,
desired_inference_units: InferenceUnitsInteger,
*,
config_overrides: Optional[ComprehendClientConfig] = None,
model_arn: Optional[ComprehendModelArn] = None,
client_request_token: Optional[ClientRequestTokenString] = None,
tags: Optional[TagList] = None,
data_access_role_arn: Optional[IamRoleArn] = None,
flywheel_arn: Optional[ComprehendFlywheelArn] = None,
) -> CreateEndpointResponse
Creates a model-specific endpoint for synchronous inference for a previously trained custom model For information about endpoints, see Managing endpoints.
Parameters:
-
endpoint_name(ComprehendEndpointName) –This is the descriptive suffix that becomes part of the
EndpointArnused for all subsequent requests to this resource. -
model_arn(Optional[ComprehendModelArn], default:None) –The Amazon Resource Number (ARN) of the model to which the endpoint will be attached.
-
desired_inference_units(InferenceUnitsInteger) –The desired number of inference units to be used by the model using this endpoint. Each inference unit represents of a throughput of 100 characters per second.
-
client_request_token(Optional[ClientRequestTokenString], default:None) –An idempotency token provided by the customer. If this token matches a previous endpoint creation request, Amazon Comprehend will not return a
ResourceInUseException. -
tags(Optional[TagList], default:None) –Tags to associate with the endpoint. A tag is a key-value pair that adds metadata to the endpoint. For example, a tag with "Sales" as the key might be added to an endpoint to indicate its use by the sales department.
-
data_access_role_arn(Optional[IamRoleArn], default:None) –The Amazon Resource Name (ARN) of the IAM role that grants Amazon Comprehend read access to trained custom models encrypted with a customer managed key (ModelKmsKeyId).
-
flywheel_arn(Optional[ComprehendFlywheelArn], default:None) –The Amazon Resource Number (ARN) of the flywheel to which the endpoint will be attached.
Raises:
-
InternalServerException–An internal server error occurred. Retry your request.
-
InvalidRequestException–The request is invalid.
-
ResourceInUseException–The specified resource name is already in use. Use a different name and try your request again.
-
ResourceLimitExceededException–The maximum number of resources per account has been exceeded. Review the resources, and then try your request again.
-
ResourceNotFoundException–The specified resource ARN was not found. Check the ARN and try your request again.
-
ResourceUnavailableException–The specified resource is not available. Check the resource and try your request again.
-
TooManyRequestsException–The number of requests exceeds the limit. Resubmit your request later.
-
TooManyTagsException–The request contains more tags than can be associated with a resource (50 tags per resource). The maximum number of tags includes both existing tags and those included in your current request.
-
UnknownServiceError–The service returned an error code this client does not model.
Source code in docs_src/capo_comprehend/_services/comprehend.py
1193 1194 1195 1196 1197 1198 1199 1200 1201 1202 1203 1204 1205 1206 1207 1208 1209 1210 1211 1212 1213 1214 1215 1216 1217 1218 1219 1220 1221 1222 1223 1224 1225 1226 1227 1228 1229 1230 1231 1232 1233 1234 1235 1236 1237 1238 1239 1240 1241 1242 1243 1244 1245 1246 1247 1248 1249 1250 1251 1252 1253 1254 1255 1256 1257 1258 1259 1260 1261 1262 1263 1264 1265 1266 1267 1268 1269 1270 1271 1272 1273 1274 1275 1276 1277 1278 1279 1280 1281 1282 1283 1284 1285 1286 | |