create_endpoint
async
¶
create_endpoint(
endpoint_name: ComprehendEndpointName,
desired_inference_units: InferenceUnitsInteger,
*,
config_overrides: Optional[AsyncComprehendClientConfig] = 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/async_comprehend.py
1075 1076 1077 1078 1079 1080 1081 1082 1083 1084 1085 1086 1087 1088 1089 1090 1091 1092 1093 1094 1095 1096 1097 1098 1099 1100 1101 1102 1103 1104 1105 1106 1107 1108 1109 1110 1111 1112 1113 1114 1115 1116 1117 1118 1119 1120 1121 1122 1123 1124 1125 1126 1127 1128 1129 1130 1131 1132 1133 1134 1135 1136 1137 1138 1139 1140 1141 1142 1143 1144 1145 1146 1147 1148 1149 1150 1151 1152 1153 1154 1155 1156 1157 1158 | |