ComputeOptimizer / Client / get_ecs_service_recommendation_projected_metrics

get_ecs_service_recommendation_projected_metrics#

ComputeOptimizer.Client.get_ecs_service_recommendation_projected_metrics(**kwargs)#

Returns the projected metrics of Amazon ECS service recommendations.

See also: AWS API Documentation

Request Syntax

response = client.get_ecs_service_recommendation_projected_metrics(
    serviceArn='string',
    stat='Maximum'|'Average',
    period=123,
    startTime=datetime(2015, 1, 1),
    endTime=datetime(2015, 1, 1)
)
Parameters:
  • serviceArn (string) –

    [REQUIRED]

    The ARN that identifies the Amazon ECS service.

    The following is the format of the ARN:

    arn:aws:ecs:region:aws_account_id:service/cluster-name/service-name

  • stat (string) –

    [REQUIRED]

    The statistic of the projected metrics.

  • period (integer) –

    [REQUIRED]

    The granularity, in seconds, of the projected metrics data points.

  • startTime (datetime) –

    [REQUIRED]

    The timestamp of the first projected metrics data point to return.

  • endTime (datetime) –

    [REQUIRED]

    The timestamp of the last projected metrics data point to return.

Return type:

dict

Returns:

Response Syntax

{
    'recommendedOptionProjectedMetrics': [
        {
            'recommendedCpuUnits': 123,
            'recommendedMemorySize': 123,
            'projectedMetrics': [
                {
                    'name': 'Cpu'|'Memory',
                    'timestamps': [
                        datetime(2015, 1, 1),
                    ],
                    'upperBoundValues': [
                        123.0,
                    ],
                    'lowerBoundValues': [
                        123.0,
                    ]
                },
            ]
        },
    ]
}

Response Structure

  • (dict) –

    • recommendedOptionProjectedMetrics (list) –

      An array of objects that describes the projected metrics.

      • (dict) –

        Describes the projected metrics of an Amazon ECS service recommendation option.

        To determine the performance difference between your current Amazon ECS service and the recommended option, compare the metric data of your service against its projected metric data.

        • recommendedCpuUnits (integer) –

          The recommended CPU size for the Amazon ECS service.

        • recommendedMemorySize (integer) –

          The recommended memory size for the Amazon ECS service.

        • projectedMetrics (list) –

          An array of objects that describe the projected metric.

          • (dict) –

            Describes the projected metrics of an Amazon ECS service recommendation option.

            To determine the performance difference between your current Amazon ECS service and the recommended option, compare the metric data of your service against its projected metric data.

            • name (string) –

              The name of the projected metric.

              The following metrics are available:

              • Cpu — The percentage of allocated compute units that are currently in use on the service tasks.

              • Memory — The percentage of memory that’s currently in use on the service tasks.

            • timestamps (list) –

              The timestamps of the projected metric.

              • (datetime) –

            • upperBoundValues (list) –

              The upper bound values for the projected metric.

              • (float) –

            • lowerBoundValues (list) –

              The lower bound values for the projected metric.

              • (float) –

Exceptions