Retrieves a list of all the installed collectors.
Parameters:
-
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:
Source code in docs_src/capo_migrationhubstrategy/_services/migration_hub_strategy.py
| def list_collectors(
self,
*,
config_overrides: Optional[MigrationHubStrategyClientConfig] = 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_collectors_response.ListCollectorsResponse":
"""<p> Retrieves a list of all the installed collectors. </p>
Args:
next_token: <p> 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 <code>maxResults</code> 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. </p>
max_results: <p> The maximum number of items to include in the response. The maximum value is 100. </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.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.
"""
def _handler(
req: "OperationRequest[capo_migrationhubstrategy.types.list_collectors_request.ListCollectorsRequest]",
) -> OperationResponse[
"capo_migrationhubstrategy.types.list_collectors_response.ListCollectorsResponse"
]:
import capo_migrationhubstrategy._operations.aws_migration_hub_strategy_recommendation.list_collectors
output, http_response = (
capo_migrationhubstrategy._operations.aws_migration_hub_strategy_recommendation.list_collectors.list_collectors(
req.options, req.input
)
)
return OperationResponse(output=output, response=http_response)
interceptors_, options_ = self.operation_options(
config_overrides, OperationLogging("ListCollectors")
)
input_: capo_migrationhubstrategy.types.list_collectors_request.ListCollectorsRequest = {}
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
|