Skip to content

list_analyzable_servers

list_analyzable_servers(
    *,
    config_overrides: Optional[MigrationHubStrategyClientConfig] = None,
    sort: Optional[SortOrder] = None,
    next_token: Optional[NextToken] = None,
    max_results: Optional[MaxResult] = None,
) -> ListAnalyzableServersResponse

Retrieves a list of all the servers fetched from customer vCenter using Strategy Recommendation Collector.

Parameters:

  • sort (Optional[SortOrder], default: None ) –

    Specifies whether to sort by ascending (ASC) or descending (DESC) order.

  • next_token (Optional[NextToken], default: None ) –

    The token from a previous call that you use to retrieve the next set of results. For example, if a previous call to this action returned 100 items, but you set maxResults to 10. You'll receive a set of 10 results along with a token. You then use the returned token to retrieve the next set of 10.

  • max_results (Optional[MaxResult], default: None ) –

    The maximum number of items to include in the response. The maximum value is 100.

Raises:

Examples:

Invoke ListAnalyzableServers

>>> client.list_analyzable_servers(max_results=100, sort='ASC')
Source code in docs_src/capo_migrationhubstrategy/_services/migration_hub_strategy.py
def list_analyzable_servers(
    self,
    *,
    config_overrides: Optional[MigrationHubStrategyClientConfig] = None,
    sort: Optional["capo_migrationhubstrategy.types.sort_order.SortOrder"] = None,
    next_token: Optional[
        "capo_migrationhubstrategy.types.next_token.NextToken"
    ] = None,
    max_results: Optional[
        "capo_migrationhubstrategy.types.max_result.MaxResult"
    ] = None,
) -> "capo_migrationhubstrategy.types.list_analyzable_servers_response.ListAnalyzableServersResponse":
    """Retrieves a list of all the servers fetched from customer vCenter using Strategy Recommendation Collector.

    Args:
        sort: Specifies whether to sort by ascending (ASC) or descending (DESC) order.
        next_token: The token from a previous call that you use to retrieve the next set of results. For example, if a previous call to this action returned 100 items, but you set maxResults to 10. You'll receive a set of 10 results along with a token. You then use the returned token to retrieve the next set of 10.
        max_results: The maximum number of items to include in the response. The maximum value is 100.

    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.validation_exception.ValidationException: <p> The request body isn't valid. </p>
        capo_migrationhubstrategy.errors.UnknownServiceError: The service returned an error code this client does not model.

    Examples:
        Invoke ListAnalyzableServers

        >>> client.list_analyzable_servers(max_results=100, sort='ASC')
    """

    def _handler(
        req: "OperationRequest[capo_migrationhubstrategy.types.list_analyzable_servers_request.ListAnalyzableServersRequest]",
    ) -> OperationResponse[
        "capo_migrationhubstrategy.types.list_analyzable_servers_response.ListAnalyzableServersResponse"
    ]:
        import capo_migrationhubstrategy._operations.aws_migration_hub_strategy_recommendation.list_analyzable_servers

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

    interceptors_, options_ = self.operation_options(
        config_overrides, OperationLogging("ListAnalyzableServers")
    )
    input_: capo_migrationhubstrategy.types.list_analyzable_servers_request.ListAnalyzableServersRequest = {}
    if sort is not None:
        input_["sort"] = sort
    if next_token is not None:
        input_["next_token"] = next_token
    if max_results is not None:
        input_["max_results"] = max_results

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