Skip to content

start_network_migration_mapping_update

start_network_migration_mapping_update(
    network_migration_execution_id: NetworkMigrationExecutionID,
    network_migration_definition_id: NetworkMigrationDefinitionID,
    *,
    config_overrides: Optional[mgnClientConfig] = None,
    constructs: Optional[StartNetworkMigrationMappingUpdateConstructs] = None,
    segments: Optional[StartNetworkMigrationMappingUpdateSegments] = None,
) -> StartNetworkMigrationMappingUpdateResponse

Starts a job to apply customer modifications to network migration mappings, such as changing properties.

Parameters:

Raises:

Examples:

Sample StartNetworkMigrationMappingUpdate call

>>> client.start_network_migration_mapping_update(network_migration_execution_id='01234567-abcd-abcd-abcd-0123456789ab', network_migration_definition_id='nmd-01234567891234567', constructs=[{'segmentID': '12345678-abcd-abcd-efab-0123456789ab', 'constructID': 'abc45678-abcd-abcd-efab-012345678abc', 'constructType': 'AWS::EC2::VPC', 'operation': {'update': {'properties': {'CidrBlock': '10.31.0.0/22'}}}}], segments=[{'segmentID': '12345678-abcd-abcd-efab-0123456789ab', 'targetAccount': '234567890123', 'scopeTags': {'key1': 'val1', 'key2': 'val2'}}])
Source code in docs_src/capo_mgn/_services/mgn.py
def start_network_migration_mapping_update(
    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",
    *,
    config_overrides: Optional[mgnClientConfig] = None,
    constructs: Optional[
        "capo_mgn.types.start_network_migration_mapping_update_constructs.StartNetworkMigrationMappingUpdateConstructs"
    ] = None,
    segments: Optional[
        "capo_mgn.types.start_network_migration_mapping_update_segments.StartNetworkMigrationMappingUpdateSegments"
    ] = None,
) -> "capo_mgn.types.start_network_migration_mapping_update_response.StartNetworkMigrationMappingUpdateResponse":
    """<p>Starts a job to apply customer modifications to network migration mappings, such as changing properties.</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>
        constructs: <p>A list of construct updates to apply.</p>
        segments: <p>A list of segment updates to apply.</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.conflict_exception.ConflictException: <p>The request could not be completed due to a conflict with the current state of the target resource.</p>
        capo_mgn.errors.resource_not_found_exception.ResourceNotFoundException: <p>Resource not found exception.</p>
        capo_mgn.errors.service_quota_exceeded_exception.ServiceQuotaExceededException: <p>The request could not be completed because it exceeded the service quota.</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 StartNetworkMigrationMappingUpdate call

        >>> client.start_network_migration_mapping_update(network_migration_execution_id='01234567-abcd-abcd-abcd-0123456789ab', network_migration_definition_id='nmd-01234567891234567', constructs=[{'segmentID': '12345678-abcd-abcd-efab-0123456789ab', 'constructID': 'abc45678-abcd-abcd-efab-012345678abc', 'constructType': 'AWS::EC2::VPC', 'operation': {'update': {'properties': {'CidrBlock': '10.31.0.0/22'}}}}], segments=[{'segmentID': '12345678-abcd-abcd-efab-0123456789ab', 'targetAccount': '234567890123', 'scopeTags': {'key1': 'val1', 'key2': 'val2'}}])
    """

    def _handler(
        req: "OperationRequest[capo_mgn.types.start_network_migration_mapping_update_request.StartNetworkMigrationMappingUpdateRequest]",
    ) -> OperationResponse[
        "capo_mgn.types.start_network_migration_mapping_update_response.StartNetworkMigrationMappingUpdateResponse"
    ]:
        import capo_mgn._operations.application_migration_service.start_network_migration_mapping_update

        output, http_response = (
            capo_mgn._operations.application_migration_service.start_network_migration_mapping_update.start_network_migration_mapping_update(
                req.options, req.input
            )
        )
        return OperationResponse(output=output, response=http_response)

    def _redact_input(
        input_: "capo_mgn.types.start_network_migration_mapping_update_request.StartNetworkMigrationMappingUpdateRequest",
    ) -> dict[str, Any]:
        import capo_mgn.types.start_network_migration_mapping_update_request

        return capo_mgn.types.start_network_migration_mapping_update_request.redact_sensitive(
            input_
        )

    interceptors_, options_ = self.operation_options(
        config_overrides,
        OperationLogging(
            "StartNetworkMigrationMappingUpdate", redact_input=_redact_input
        ),
    )
    input_: capo_mgn.types.start_network_migration_mapping_update_request.StartNetworkMigrationMappingUpdateRequest = {
        "network_migration_execution_id": network_migration_execution_id,
        "network_migration_definition_id": network_migration_definition_id,
    }
    if constructs is not None:
        input_["constructs"] = constructs
    if segments is not None:
        input_["segments"] = segments

    response = execute_pipeline(
        OperationRequest(input=input_, options=options_),
        handler=_handler,
        interceptors=list(interceptors_),
    )
    response.response.close()
    return response.output