Skip to content

list_network_migration_mapper_segment_constructs async

list_network_migration_mapper_segment_constructs(
    network_migration_execution_id: NetworkMigrationExecutionID,
    network_migration_definition_id: NetworkMigrationDefinitionID,
    segment_id: SegmentID,
    *,
    config_overrides: Optional[AsyncmgnClientConfig] = None,
    filters: Optional[ListNetworkMigrationMapperSegmentConstructsFilters] = None,
    max_results: Optional[MaxResultsType] = None,
    next_token: Optional[PaginationToken] = None,
) -> ListNetworkMigrationMapperSegmentConstructsResponse

Lists constructs within a mapper segment, representing individual infrastructure components like VPCs, subnets, or security groups.

Parameters:

Raises:

Examples:

Sample ListNetworkMigrationMapperSegmentConstructs call with properties enabled

>>> await client.list_network_migration_mapper_segment_constructs(network_migration_execution_id='01234567-abcd-abcd-abcd-0123456789ab', network_migration_definition_id='nmd-01234567891234567', segment_id='12345678-abcd-abcd-efab-0123456789ab')
Sample ListNetworkMigrationMapperSegmentConstructs call with properties disabled (default)
>>> await client.list_network_migration_mapper_segment_constructs(network_migration_execution_id='01234567-abcd-abcd-abcd-0123456789ab', network_migration_definition_id='nmd-01234567891234567', segment_id='12345678-abcd-abcd-efab-0123456789ab')
Source code in docs_src/capo_mgn/_services/async_mgn.py
async def list_network_migration_mapper_segment_constructs(
    self,
    network_migration_execution_id: "capo_mgn.types.network_migration_execution_id.NetworkMigrationExecutionID",
    network_migration_definition_id: "capo_mgn.types.network_migration_definition_id.NetworkMigrationDefinitionID",
    segment_id: "capo_mgn.types.segment_id.SegmentID",
    *,
    config_overrides: Optional[AsyncmgnClientConfig] = None,
    filters: Optional[
        "capo_mgn.types.list_network_migration_mapper_segment_constructs_filters.ListNetworkMigrationMapperSegmentConstructsFilters"
    ] = 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_mapper_segment_constructs_response.ListNetworkMigrationMapperSegmentConstructsResponse":
    """<p>Lists constructs within a mapper segment, representing individual infrastructure components like VPCs, subnets, or security groups.</p>

    Args:
        network_migration_execution_id: <p>The unique identifier of the network migration execution.</p>
        network_migration_definition_id: <p>The unique identifier of the network migration definition.</p>
        segment_id: <p>The unique identifier of the segment to list constructs for.</p>
        filters: <p>Filters to apply when listing constructs, such as construct type or ID.</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:
        Sample ListNetworkMigrationMapperSegmentConstructs call with properties enabled

        >>> await client.list_network_migration_mapper_segment_constructs(network_migration_execution_id='01234567-abcd-abcd-abcd-0123456789ab', network_migration_definition_id='nmd-01234567891234567', segment_id='12345678-abcd-abcd-efab-0123456789ab')
        Sample ListNetworkMigrationMapperSegmentConstructs call with properties disabled (default)

        >>> await client.list_network_migration_mapper_segment_constructs(network_migration_execution_id='01234567-abcd-abcd-abcd-0123456789ab', network_migration_definition_id='nmd-01234567891234567', segment_id='12345678-abcd-abcd-efab-0123456789ab')
    """

    async def _handler(
        req: "AsyncOperationRequest[capo_mgn.types.list_network_migration_mapper_segment_constructs_request.ListNetworkMigrationMapperSegmentConstructsRequest]",
    ) -> AsyncOperationResponse[
        "capo_mgn.types.list_network_migration_mapper_segment_constructs_response.ListNetworkMigrationMapperSegmentConstructsResponse"
    ]:
        import capo_mgn._operations.application_migration_service.list_network_migration_mapper_segment_constructs

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

    interceptors_, options_ = self.operation_options(
        config_overrides,
        OperationLogging("ListNetworkMigrationMapperSegmentConstructs"),
    )
    input_: capo_mgn.types.list_network_migration_mapper_segment_constructs_request.ListNetworkMigrationMapperSegmentConstructsRequest = {
        "network_migration_execution_id": network_migration_execution_id,
        "network_migration_definition_id": network_migration_definition_id,
        "segment_id": segment_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