Skip to content

list_network_migration_executions async

list_network_migration_executions(
    network_migration_definition_id: NetworkMigrationDefinitionID,
    *,
    config_overrides: Optional[AsyncmgnClientConfig] = None,
    filters: Optional[ListNetworkMigrationExecutionRequestFilters] = None,
    next_token: Optional[PaginationToken] = None,
    max_results: Optional[MaxResultsType] = None,
) -> ListNetworkMigrationExecutionsResponse

Lists network migration execution instances for a given definition, showing the status and progress of each execution.

Parameters:

Raises:

Examples:

Sample ListNetworkMigrationExecutions call

>>> await client.list_network_migration_executions(network_migration_definition_id='nmd-01234567891234567')
Source code in docs_src/capo_mgn/_services/async_mgn.py
async def list_network_migration_executions(
    self,
    network_migration_definition_id: "capo_mgn.types.network_migration_definition_id.NetworkMigrationDefinitionID",
    *,
    config_overrides: Optional[AsyncmgnClientConfig] = None,
    filters: Optional[
        "capo_mgn.types.list_network_migration_execution_request_filters.ListNetworkMigrationExecutionRequestFilters"
    ] = None,
    next_token: Optional["capo_mgn.types.pagination_token.PaginationToken"] = None,
    max_results: Optional["capo_mgn.types.max_results_type.MaxResultsType"] = None,
) -> "capo_mgn.types.list_network_migration_executions_response.ListNetworkMigrationExecutionsResponse":
    """<p>Lists network migration execution instances for a given definition, showing the status and progress of each execution.</p>

    Args:
        network_migration_definition_id: <p>The unique identifier of the network migration definition to list executions for.</p>
        filters: <p>Filters to apply when listing executions, such as status or execution ID.</p>
        next_token: <p>The token for the next page of results.</p>
        max_results: <p>The maximum number of results to return in a single call.</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.UnknownServiceError: The service returned an error code this client does not model.

    Examples:
        Sample ListNetworkMigrationExecutions call

        >>> await client.list_network_migration_executions(network_migration_definition_id='nmd-01234567891234567')
    """

    async def _handler(
        req: "AsyncOperationRequest[capo_mgn.types.list_network_migration_executions_request.ListNetworkMigrationExecutionsRequest]",
    ) -> AsyncOperationResponse[
        "capo_mgn.types.list_network_migration_executions_response.ListNetworkMigrationExecutionsResponse"
    ]:
        import capo_mgn._operations.application_migration_service.list_network_migration_executions

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

    def _redact_output(
        output: "capo_mgn.types.list_network_migration_executions_response.ListNetworkMigrationExecutionsResponse",
    ) -> dict[str, Any]:
        import capo_mgn.types.list_network_migration_executions_response

        return capo_mgn.types.list_network_migration_executions_response.redact_sensitive(
            output
        )

    interceptors_, options_ = self.operation_options(
        config_overrides,
        OperationLogging(
            "ListNetworkMigrationExecutions", redact_output=_redact_output
        ),
    )
    input_: capo_mgn.types.list_network_migration_executions_request.ListNetworkMigrationExecutionsRequest = {
        "network_migration_definition_id": network_migration_definition_id
    }
    if filters is not None:
        input_["filters"] = filters
    if next_token is not None:
        input_["next_token"] = next_token
    if max_results is not None:
        input_["max_results"] = max_results

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