Comprehend / Client / create_endpoint

create_endpoint#

Comprehend.Client.create_endpoint(**kwargs)#

Creates a model-specific endpoint for synchronous inference for a previously trained custom model For information about endpoints, see Managing endpoints.

See also: AWS API Documentation

Request Syntax

response = client.create_endpoint(
    EndpointName='string',
    ModelArn='string',
    DesiredInferenceUnits=123,
    ClientRequestToken='string',
    Tags=[
        {
            'Key': 'string',
            'Value': 'string'
        },
    ],
    DataAccessRoleArn='string',
    FlywheelArn='string'
)
Parameters:
  • EndpointName (string) –

    [REQUIRED]

    This is the descriptive suffix that becomes part of the EndpointArn used for all subsequent requests to this resource.

  • ModelArn (string) – The Amazon Resource Number (ARN) of the model to which the endpoint will be attached.

  • DesiredInferenceUnits (integer) –

    [REQUIRED]

    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.

  • ClientRequestToken (string) –

    An idempotency token provided by the customer. If this token matches a previous endpoint creation request, Amazon Comprehend will not return a ResourceInUseException.

    This field is autopopulated if not provided.

  • Tags (list) –

    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.

    • (dict) –

      A key-value pair that adds as a metadata to a resource used by Amazon Comprehend. For example, a tag with the key-value pair ‘Department’:’Sales’ might be added to a resource to indicate its use by a particular department.

      • Key (string) – [REQUIRED]

        The initial part of a key-value pair that forms a tag associated with a given resource. For instance, if you want to show which resources are used by which departments, you might use “Department” as the key portion of the pair, with multiple possible values such as “sales,” “legal,” and “administration.”

      • Value (string) –

        The second part of a key-value pair that forms a tag associated with a given resource. For instance, if you want to show which resources are used by which departments, you might use “Department” as the initial (key) portion of the pair, with a value of “sales” to indicate the sales department.

  • DataAccessRoleArn (string) – 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).

  • FlywheelArn (string) – The Amazon Resource Number (ARN) of the flywheel to which the endpoint will be attached.

Return type:

dict

Returns:

Response Syntax

{
    'EndpointArn': 'string',
    'ModelArn': 'string'
}

Response Structure

  • (dict) –

    • EndpointArn (string) –

      The Amazon Resource Number (ARN) of the endpoint being created.

    • ModelArn (string) –

      The Amazon Resource Number (ARN) of the model to which the endpoint is attached.

Exceptions

  • Comprehend.Client.exceptions.InvalidRequestException

  • Comprehend.Client.exceptions.ResourceInUseException

  • Comprehend.Client.exceptions.ResourceLimitExceededException

  • Comprehend.Client.exceptions.ResourceNotFoundException

  • Comprehend.Client.exceptions.ResourceUnavailableException

  • Comprehend.Client.exceptions.TooManyRequestsException

  • Comprehend.Client.exceptions.TooManyTagsException

  • Comprehend.Client.exceptions.InternalServerException