get_ecs_service_recommendations
¶
get_ecs_service_recommendations(
*,
config_overrides: Optional[ComputeOptimizerClientConfig] = None,
service_arns: Optional[ServiceArns] = None,
next_token: Optional[NextToken] = None,
max_results: Optional[MaxResults] = None,
filters: Optional[ECSServiceRecommendationFilters] = None,
account_ids: Optional[AccountIds] = None,
) -> GetECSServiceRecommendationsResponse
Returns Amazon ECS service recommendations.
Compute Optimizer generates recommendations for Amazon ECS services on Fargate that meet a specific set of requirements. For more information, see the Supported resources and requirements in the Compute Optimizer User Guide.
Parameters:
-
service_arns(Optional[ServiceArns], default:None) –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 -
next_token(Optional[NextToken], default:None) –The token to advance to the next page of Amazon ECS service recommendations.
-
max_results(Optional[MaxResults], default:None) –The maximum number of Amazon ECS service recommendations to return with a single request.
To retrieve the remaining results, make another request with the returned
nextTokenvalue. -
filters(Optional[ECSServiceRecommendationFilters], default:None) –An array of objects to specify a filter that returns a more specific list of Amazon ECS service recommendations.
-
account_ids(Optional[AccountIds], default:None) –Return the Amazon ECS service recommendations to the specified Amazon Web Services account IDs.
If your account is the management account or the delegated administrator of an organization, use this parameter to return the Amazon ECS service recommendations to specific member accounts.
You can only specify one account ID per request.
Raises:
-
AccessDeniedException–You do not have sufficient access to perform this action.
-
InternalServerException–An internal error has occurred. Try your call again.
-
InvalidParameterValueException–The value supplied for the input parameter is out of range or not valid.
-
MissingAuthenticationToken–The request must contain either a valid (registered) Amazon Web Services access key ID or X.509 certificate.
-
OptInRequiredException–The account is not opted in to Compute Optimizer.
-
ResourceNotFoundException–A resource that is required for the action doesn't exist.
-
ServiceUnavailableException–The request has failed due to a temporary failure of the server.
-
ThrottlingException–The request was denied due to request throttling.
-
UnknownServiceError–The service returned an error code this client does not model.
Source code in docs_src/capo_compute_optimizer/_services/compute_optimizer.py
1448 1449 1450 1451 1452 1453 1454 1455 1456 1457 1458 1459 1460 1461 1462 1463 1464 1465 1466 1467 1468 1469 1470 1471 1472 1473 1474 1475 1476 1477 1478 1479 1480 1481 1482 1483 1484 1485 1486 1487 1488 1489 1490 1491 1492 1493 1494 1495 1496 1497 1498 1499 1500 1501 1502 1503 1504 1505 1506 1507 1508 1509 1510 1511 1512 1513 1514 1515 1516 1517 1518 1519 1520 1521 1522 1523 1524 | |