SageMaker / Client / update_endpoint_weights_and_capacities

update_endpoint_weights_and_capacities#

SageMaker.Client.update_endpoint_weights_and_capacities(**kwargs)#

Updates variant weight of one or more variants associated with an existing endpoint, or capacity of one variant associated with an existing endpoint. When it receives the request, SageMaker sets the endpoint status to Updating. After updating the endpoint, it sets the status to InService. To check the status of an endpoint, use the DescribeEndpoint API.

See also: AWS API Documentation

Request Syntax

response = client.update_endpoint_weights_and_capacities(
    EndpointName='string',
    DesiredWeightsAndCapacities=[
        {
            'VariantName': 'string',
            'DesiredWeight': ...,
            'DesiredInstanceCount': 123
        },
    ]
)
Parameters:
  • EndpointName (string) –

    [REQUIRED]

    The name of an existing SageMaker endpoint.

  • DesiredWeightsAndCapacities (list) –

    [REQUIRED]

    An object that provides new capacity and weight values for a variant.

    • (dict) –

      Specifies weight and capacity values for a production variant.

      • VariantName (string) – [REQUIRED]

        The name of the variant to update.

      • DesiredWeight (float) –

        The variant’s weight.

      • DesiredInstanceCount (integer) –

        The variant’s capacity.

Return type:

dict

Returns:

Response Syntax

{
    'EndpointArn': 'string'
}

Response Structure

  • (dict) –

    • EndpointArn (string) –

      The Amazon Resource Name (ARN) of the updated endpoint.

Exceptions

  • SageMaker.Client.exceptions.ResourceLimitExceeded