Skip to content

get_portfolio_summary

get_portfolio_summary(
    *, config_overrides: Optional[MigrationHubStrategyClientConfig] = None
) -> GetPortfolioSummaryResponse

Retrieves overall summary including the number of servers to rehost and the overall number of anti-patterns.

Raises:

  • AccessDeniedException –

    The user does not have permission to perform the action. Check the AWS Identity and Access Management (IAM) policy associated with this user.

  • InternalServerException –

    The server experienced an internal error. Try again.

  • 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_migrationhubstrategy/_services/migration_hub_strategy.py
def get_portfolio_summary(
    self, *, config_overrides: Optional[MigrationHubStrategyClientConfig] = None
) -> "capo_migrationhubstrategy.types.get_portfolio_summary_response.GetPortfolioSummaryResponse":
    """<p> Retrieves overall summary including the number of servers to rehost and the overall number of anti-patterns. </p>

    Raises:
        capo_migrationhubstrategy.errors.access_denied_exception.AccessDeniedException: <p> The user does not have permission to perform the action. Check the AWS Identity and Access Management (IAM) policy associated with this user.</p>
        capo_migrationhubstrategy.errors.internal_server_exception.InternalServerException: <p> The server experienced an internal error. Try again. </p>
        capo_migrationhubstrategy.errors.throttling_exception.ThrottlingException: <p> The request was denied due to request throttling. </p>
        capo_migrationhubstrategy.errors.UnknownServiceError: The service returned an error code this client does not model.
    """

    def _handler(
        req: "OperationRequest[capo_migrationhubstrategy.types.get_portfolio_summary_request.GetPortfolioSummaryRequest]",
    ) -> OperationResponse[
        "capo_migrationhubstrategy.types.get_portfolio_summary_response.GetPortfolioSummaryResponse"
    ]:
        import capo_migrationhubstrategy._operations.aws_migration_hub_strategy_recommendation.get_portfolio_summary

        output, http_response = (
            capo_migrationhubstrategy._operations.aws_migration_hub_strategy_recommendation.get_portfolio_summary.get_portfolio_summary(
                req.options, req.input
            )
        )
        return OperationResponse(output=output, response=http_response)

    interceptors_, options_ = self.operation_options(
        config_overrides, OperationLogging("GetPortfolioSummary")
    )
    input_: capo_migrationhubstrategy.types.get_portfolio_summary_request.GetPortfolioSummaryRequest = {}

    response = execute_pipeline(
        OperationRequest(input=input_, options=options_),
        handler=_handler,
        interceptors=list(interceptors_),
    )
    response.response.close()
    return response.output