Starts generating a recommendation report.
Parameters:
-
output_format
(Optional[OutputFormat], default:
None
)
–
The output format for the recommendation report file. The default format is Microsoft Excel.
-
group_id_filter
(Optional[GroupIds], default:
None
)
–
Groups the resources in the recommendation report with a unique name.
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.
-
ConflictException
–
Exception to indicate that there is an ongoing task when a new task is created. Return when once the existing tasks are complete.
-
InternalServerException
–
The server experienced an internal error. Try again.
-
ThrottlingException
–
The request was denied due to request throttling.
-
ValidationException
–
The request body isn't valid.
-
UnknownServiceError
–
The service returned an error code this client does not model.
Source code in docs_src/capo_migrationhubstrategy/_services/async_migration_hub_strategy.py
| async def start_recommendation_report_generation(
self,
*,
config_overrides: Optional[AsyncMigrationHubStrategyClientConfig] = None,
output_format: Optional[
"capo_migrationhubstrategy.types.output_format.OutputFormat"
] = None,
group_id_filter: Optional[
"capo_migrationhubstrategy.types.group_ids.GroupIds"
] = None,
) -> "capo_migrationhubstrategy.types.start_recommendation_report_generation_response.StartRecommendationReportGenerationResponse":
"""<p> Starts generating a recommendation report. </p>
Args:
output_format: <p> The output format for the recommendation report file. The default format is Microsoft Excel. </p>
group_id_filter: <p> Groups the resources in the recommendation report with a unique name. </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.conflict_exception.ConflictException: <p> Exception to indicate that there is an ongoing task when a new task is created. Return when once the existing tasks are complete. </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.
"""
async def _handler(
req: "AsyncOperationRequest[capo_migrationhubstrategy.types.start_recommendation_report_generation_request.StartRecommendationReportGenerationRequest]",
) -> AsyncOperationResponse[
"capo_migrationhubstrategy.types.start_recommendation_report_generation_response.StartRecommendationReportGenerationResponse"
]:
import capo_migrationhubstrategy._operations.aws_migration_hub_strategy_recommendation.start_recommendation_report_generation
(
output,
http_response,
) = await capo_migrationhubstrategy._operations.aws_migration_hub_strategy_recommendation.start_recommendation_report_generation.async_start_recommendation_report_generation(
req.options, req.input
)
return AsyncOperationResponse(output=output, response=http_response)
interceptors_, options_ = self.operation_options(
config_overrides, OperationLogging("StartRecommendationReportGeneration")
)
input_: capo_migrationhubstrategy.types.start_recommendation_report_generation_request.StartRecommendationReportGenerationRequest = {}
if output_format is not None:
input_["output_format"] = output_format
if group_id_filter is not None:
input_["group_id_filter"] = group_id_filter
response = await aexecute_pipeline(
AsyncOperationRequest(input=input_, options=options_),
handler=_handler,
interceptors=list(interceptors_),
)
await response.response.aclose()
return response.output
|