Skip to content

start_import_file_enrichment

start_import_file_enrichment(
    s3_bucket_source: EnrichmentSourceS3Configuration,
    s3_bucket_target: EnrichmentTargetS3Configuration,
    *,
    config_overrides: Optional[mgnClientConfig] = None,
    client_token: Optional[ClientIdempotencyToken] = None,
    ip_assignment_strategy: Optional[IpAssignmentStrategy] = None,
) -> StartImportFileEnrichmentResponse

Starts an import file enrichment job to process and enrich network migration import files with additional metadata and IP assignment strategies.

Parameters:

  • client_token (Optional[ClientIdempotencyToken], default: None ) –

    A unique, case-sensitive identifier that you provide to ensure the idempotency of the request.

  • s3_bucket_source (EnrichmentSourceS3Configuration) –

    The S3 configuration specifying the source location of the import file to be enriched.

  • s3_bucket_target (EnrichmentTargetS3Configuration) –

    The S3 configuration specifying the target location where the enriched import file will be stored.

  • ip_assignment_strategy (Optional[IpAssignmentStrategy], default: None ) –

    The IP assignment strategy to use when enriching the import file. Can be STATIC or DYNAMIC.

Raises:

Examples:

Sample StartImportFileEnrichment call

>>> client.start_import_file_enrichment(s3_bucket_source={'s3Bucket': 'my-source-bucket', 's3BucketOwner': '123456789012', 's3Key': 'imports/source-file.csv'}, s3_bucket_target={'s3Bucket': 'my-target-bucket', 's3BucketOwner': '123456789012', 's3Key': 'enriched/output.csv'}, ip_assignment_strategy='STATIC')
Source code in docs_src/capo_mgn/_services/mgn.py
def start_import_file_enrichment(
    self,
    s3_bucket_source: "capo_mgn.types.enrichment_source_s3_configuration.EnrichmentSourceS3Configuration",
    s3_bucket_target: "capo_mgn.types.enrichment_target_s3_configuration.EnrichmentTargetS3Configuration",
    *,
    config_overrides: Optional[mgnClientConfig] = None,
    client_token: Optional[
        "capo_mgn.types.client_idempotency_token.ClientIdempotencyToken"
    ] = None,
    ip_assignment_strategy: Optional[
        "capo_mgn.types.ip_assignment_strategy.IpAssignmentStrategy"
    ] = None,
) -> "capo_mgn.types.start_import_file_enrichment_response.StartImportFileEnrichmentResponse":
    """<p>Starts an import file enrichment job to process and enrich network migration import files with additional metadata and IP assignment strategies.</p>

    Args:
        client_token: <p>A unique, case-sensitive identifier that you provide to ensure the idempotency of the request.</p>
        s3_bucket_source: <p>The S3 configuration specifying the source location of the import file to be enriched.</p>
        s3_bucket_target: <p>The S3 configuration specifying the target location where the enriched import file will be stored.</p>
        ip_assignment_strategy: <p>The IP assignment strategy to use when enriching the import file. Can be STATIC or DYNAMIC.</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.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 StartImportFileEnrichment call

        >>> client.start_import_file_enrichment(s3_bucket_source={'s3Bucket': 'my-source-bucket', 's3BucketOwner': '123456789012', 's3Key': 'imports/source-file.csv'}, s3_bucket_target={'s3Bucket': 'my-target-bucket', 's3BucketOwner': '123456789012', 's3Key': 'enriched/output.csv'}, ip_assignment_strategy='STATIC')
    """

    def _handler(
        req: "OperationRequest[capo_mgn.types.start_import_file_enrichment_request.StartImportFileEnrichmentRequest]",
    ) -> OperationResponse[
        "capo_mgn.types.start_import_file_enrichment_response.StartImportFileEnrichmentResponse"
    ]:
        import capo_mgn._operations.application_migration_service.start_import_file_enrichment

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

    interceptors_, options_ = self.operation_options(
        config_overrides, OperationLogging("StartImportFileEnrichment")
    )
    input_: capo_mgn.types.start_import_file_enrichment_request.StartImportFileEnrichmentRequest = {
        "s3_bucket_source": s3_bucket_source,
        "s3_bucket_target": s3_bucket_target,
    }
    if client_token is None:
        client_token = str(uuid.uuid4())
    input_["client_token"] = client_token
    if ip_assignment_strategy is not None:
        input_["ip_assignment_strategy"] = ip_assignment_strategy

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