Skip to content

list_network_migration_insights async

list_network_migration_insights(
    network_migration_definition_id: NetworkMigrationDefinitionID,
    *,
    config_overrides: Optional[AsyncmgnClientConfig] = None,
    network_migration_execution_id: Optional[NetworkMigrationExecutionID] = None,
    producer_id: Optional[InsightProducerID] = None,
    segment_id: Optional[SegmentID] = None,
    construct_id: Optional[ConstructID] = None,
    filters: Optional[ListNetworkMigrationInsightsFilters] = None,
    max_results: Optional[MaxResultsType] = None,
    next_token: Optional[PaginationToken] = None,
) -> ListNetworkMigrationInsightsResponse

Lists network migration insights for a network migration definition.

Parameters:

Raises:

Examples:

List the WARNING insights a mapping job recorded for one construct

>>> await client.list_network_migration_insights(network_migration_definition_id='nmd-54cf850b22f7cf65e', network_migration_execution_id='b1235ba8-398e-4ef0-b803-78c8c85b5021', producer_id='f7aa9266-b070-421b-a630-e503783b7f12', filters={'insightTypes': ['WARNING']})
Source code in docs_src/capo_mgn/_services/async_mgn.py
async def list_network_migration_insights(
    self,
    network_migration_definition_id: "capo_mgn.types.network_migration_definition_id.NetworkMigrationDefinitionID",
    *,
    config_overrides: Optional[AsyncmgnClientConfig] = None,
    network_migration_execution_id: Optional[
        "capo_mgn.types.network_migration_execution_id.NetworkMigrationExecutionID"
    ] = None,
    producer_id: Optional[
        "capo_mgn.types.insight_producer_id.InsightProducerID"
    ] = None,
    segment_id: Optional["capo_mgn.types.segment_id.SegmentID"] = None,
    construct_id: Optional["capo_mgn.types.construct_id.ConstructID"] = None,
    filters: Optional[
        "capo_mgn.types.list_network_migration_insights_filters.ListNetworkMigrationInsightsFilters"
    ] = None,
    max_results: Optional["capo_mgn.types.max_results_type.MaxResultsType"] = None,
    next_token: Optional["capo_mgn.types.pagination_token.PaginationToken"] = None,
) -> "capo_mgn.types.list_network_migration_insights_response.ListNetworkMigrationInsightsResponse":
    """<p>Lists network migration insights for a network migration definition.</p>

    Args:
        network_migration_definition_id: <p>The unique identifier of the network migration definition.</p>
        network_migration_execution_id: <p>The unique identifier of the network migration execution to narrow the results to.</p>
        producer_id: <p>The identifier of the job or API request to narrow the results to.</p>
        segment_id: <p>The unique identifier of the segment to narrow the results to.</p>
        construct_id: <p>The unique identifier of the construct to narrow the results to.</p>
        filters: <p>Filters to apply when listing insights.</p>
        max_results: <p>The maximum number of results to return in a single call.</p>
        next_token: <p>The token for the next page of results.</p>

    Raises:
        capo_mgn.errors.access_denied_exception.AccessDeniedException: <p>Operation denied due to a file permission or access check error.</p>
        capo_mgn.errors.resource_not_found_exception.ResourceNotFoundException: <p>Resource not found exception.</p>
        capo_mgn.errors.throttling_exception.ThrottlingException: <p>Reached throttling quota exception.</p>
        capo_mgn.errors.validation_exception.ValidationException: <p>Validate exception.</p>
        capo_mgn.errors.UnknownServiceError: The service returned an error code this client does not model.

    Examples:
        List the WARNING insights a mapping job recorded for one construct

        >>> await client.list_network_migration_insights(network_migration_definition_id='nmd-54cf850b22f7cf65e', network_migration_execution_id='b1235ba8-398e-4ef0-b803-78c8c85b5021', producer_id='f7aa9266-b070-421b-a630-e503783b7f12', filters={'insightTypes': ['WARNING']})
    """

    async def _handler(
        req: "AsyncOperationRequest[capo_mgn.types.list_network_migration_insights_request.ListNetworkMigrationInsightsRequest]",
    ) -> AsyncOperationResponse[
        "capo_mgn.types.list_network_migration_insights_response.ListNetworkMigrationInsightsResponse"
    ]:
        import capo_mgn._operations.application_migration_service.list_network_migration_insights

        (
            output,
            http_response,
        ) = await capo_mgn._operations.application_migration_service.list_network_migration_insights.async_list_network_migration_insights(
            req.options, req.input
        )
        return AsyncOperationResponse(output=output, response=http_response)

    interceptors_, options_ = self.operation_options(
        config_overrides, OperationLogging("ListNetworkMigrationInsights")
    )
    input_: capo_mgn.types.list_network_migration_insights_request.ListNetworkMigrationInsightsRequest = {
        "network_migration_definition_id": network_migration_definition_id
    }
    if network_migration_execution_id is not None:
        input_["network_migration_execution_id"] = network_migration_execution_id
    if producer_id is not None:
        input_["producer_id"] = producer_id
    if segment_id is not None:
        input_["segment_id"] = segment_id
    if construct_id is not None:
        input_["construct_id"] = construct_id
    if filters is not None:
        input_["filters"] = filters
    if max_results is not None:
        input_["max_results"] = max_results
    if next_token is not None:
        input_["next_token"] = next_token

    response = await aexecute_pipeline(
        AsyncOperationRequest(input=input_, options=options_),
        handler=_handler,
        interceptors=list(interceptors_),
    )
    await response.response.aclose()
    return response.output