Skip to content

start_replication_task_assessment_run

start_replication_task_assessment_run(
    replication_task_arn: String,
    service_access_role_arn: String,
    result_location_bucket: String,
    assessment_run_name: String,
    *,
    config_overrides: Optional[DatabaseMigrationServiceClientConfig] = None,
    result_location_folder: Optional[String] = None,
    result_encryption_mode: Optional[String] = None,
    result_kms_key_arn: Optional[String] = None,
    include_only: Optional[IncludeTestList] = None,
    exclude: Optional[ExcludeTestList] = None,
    tags: Optional[TagList] = None,
) -> StartReplicationTaskAssessmentRunResponse

Starts a new premigration assessment run for one or more individual assessments of a migration task.

The assessments that you can specify depend on the source and target database engine and the migration type defined for the given task. To run this operation, your migration task must already be created. After you run this operation, you can review the status of each individual assessment. You can also run the migration task manually after the assessment run and its individual assessments complete.

Parameters:

  • replication_task_arn (String) –

    Amazon Resource Name (ARN) of the migration task associated with the premigration assessment run that you want to start.

  • service_access_role_arn (String) –

    ARN of the service role needed to start the assessment run. The role must allow the iam:PassRole action.

  • result_location_bucket (String) –

    Amazon S3 bucket where you want DMS to store the results of this assessment run.

  • result_location_folder (Optional[String], default: None ) –

    Folder within an Amazon S3 bucket where you want DMS to store the results of this assessment run.

  • result_encryption_mode (Optional[String], default: None ) –

    Encryption mode that you can specify to encrypt the results of this assessment run. If you don't specify this request parameter, DMS stores the assessment run results without encryption. You can specify one of the options following:

    • "SSE_S3" – The server-side encryption provided as a default by Amazon S3.

    • "SSE_KMS" – Key Management Service (KMS) encryption. This encryption can use either a custom KMS encryption key that you specify or the default KMS encryption key that DMS provides.

  • result_kms_key_arn (Optional[String], default: None ) –

    ARN of a custom KMS encryption key that you specify when you set ResultEncryptionMode to "SSE_KMS".

  • assessment_run_name (String) –

    Unique name to identify the assessment run.

  • include_only (Optional[IncludeTestList], default: None ) –

    Space-separated list of names for specific individual assessments that you want to include. These names come from the default list of individual assessments that DMS supports for the associated migration task. This task is specified by ReplicationTaskArn.

    You can't set a value for IncludeOnly if you also set a value for Exclude in the API operation.

    To identify the names of the default individual assessments that DMS supports for the associated migration task, run the DescribeApplicableIndividualAssessments operation using its own ReplicationTaskArn request parameter.

  • exclude (Optional[ExcludeTestList], default: None ) –

    Space-separated list of names for specific individual assessments that you want to exclude. These names come from the default list of individual assessments that DMS supports for the associated migration task. This task is specified by ReplicationTaskArn.

    You can't set a value for Exclude if you also set a value for IncludeOnly in the API operation.

    To identify the names of the default individual assessments that DMS supports for the associated migration task, run the DescribeApplicableIndividualAssessments operation using its own ReplicationTaskArn request parameter.

  • tags (Optional[TagList], default: None ) –

    One or more tags to be assigned to the premigration assessment run that you want to start.

Raises:

Source code in docs_src/capo_database_migration_service/_services/database_migration_service.py
def start_replication_task_assessment_run(
    self,
    replication_task_arn: "capo_database_migration_service.types.string.String",
    service_access_role_arn: "capo_database_migration_service.types.string.String",
    result_location_bucket: "capo_database_migration_service.types.string.String",
    assessment_run_name: "capo_database_migration_service.types.string.String",
    *,
    config_overrides: Optional[DatabaseMigrationServiceClientConfig] = None,
    result_location_folder: Optional[
        "capo_database_migration_service.types.string.String"
    ] = None,
    result_encryption_mode: Optional[
        "capo_database_migration_service.types.string.String"
    ] = None,
    result_kms_key_arn: Optional[
        "capo_database_migration_service.types.string.String"
    ] = None,
    include_only: Optional[
        "capo_database_migration_service.types.include_test_list.IncludeTestList"
    ] = None,
    exclude: Optional[
        "capo_database_migration_service.types.exclude_test_list.ExcludeTestList"
    ] = None,
    tags: Optional["capo_database_migration_service.types.tag_list.TagList"] = None,
) -> "capo_database_migration_service.types.start_replication_task_assessment_run_response.StartReplicationTaskAssessmentRunResponse":
    """<p>Starts a new premigration assessment run for one or more individual assessments of a migration task.</p> <p>The assessments that you can specify depend on the source and target database engine and the migration type defined for the given task. To run this operation, your migration task must already be created. After you run this operation, you can review the status of each individual assessment. You can also run the migration task manually after the assessment run and its individual assessments complete.</p>

    Args:
        replication_task_arn: <p>Amazon Resource Name (ARN) of the migration task associated with the premigration assessment run that you want to start.</p>
        service_access_role_arn: <p>ARN of the service role needed to start the assessment run. The role must allow the <code>iam:PassRole</code> action.</p>
        result_location_bucket: <p>Amazon S3 bucket where you want DMS to store the results of this assessment run.</p>
        result_location_folder: <p>Folder within an Amazon S3 bucket where you want DMS to store the results of this assessment run.</p>
        result_encryption_mode: <p>Encryption mode that you can specify to encrypt the results of this assessment run. If you don't specify this request parameter, DMS stores the assessment run results without encryption. You can specify one of the options following:</p> <ul> <li> <p> <code>"SSE_S3"</code> – The server-side encryption provided as a default by Amazon S3.</p> </li> <li> <p> <code>"SSE_KMS"</code> – Key Management Service (KMS) encryption. This encryption can use either a custom KMS encryption key that you specify or the default KMS encryption key that DMS provides.</p> </li> </ul>
        result_kms_key_arn: <p>ARN of a custom KMS encryption key that you specify when you set <code>ResultEncryptionMode</code> to <code>"SSE_KMS</code>".</p>
        assessment_run_name: <p>Unique name to identify the assessment run.</p>
        include_only: <p>Space-separated list of names for specific individual assessments that you want to include. These names come from the default list of individual assessments that DMS supports for the associated migration task. This task is specified by <code>ReplicationTaskArn</code>.</p> <note> <p>You can't set a value for <code>IncludeOnly</code> if you also set a value for <code>Exclude</code> in the API operation. </p> <p>To identify the names of the default individual assessments that DMS supports for the associated migration task, run the <code>DescribeApplicableIndividualAssessments</code> operation using its own <code>ReplicationTaskArn</code> request parameter.</p> </note>
        exclude: <p>Space-separated list of names for specific individual assessments that you want to exclude. These names come from the default list of individual assessments that DMS supports for the associated migration task. This task is specified by <code>ReplicationTaskArn</code>.</p> <note> <p>You can't set a value for <code>Exclude</code> if you also set a value for <code>IncludeOnly</code> in the API operation.</p> <p>To identify the names of the default individual assessments that DMS supports for the associated migration task, run the <code>DescribeApplicableIndividualAssessments</code> operation using its own <code>ReplicationTaskArn</code> request parameter.</p> </note>
        tags: <p>One or more tags to be assigned to the premigration assessment run that you want to start.</p>

    Raises:
        capo_database_migration_service.errors.access_denied_fault.AccessDeniedFault: <p>DMS was denied access to the endpoint. Check that the role is correctly configured.</p>
        capo_database_migration_service.errors.invalid_resource_state_fault.InvalidResourceStateFault: <p>The resource is in a state that prevents it from being used for database migration.</p>
        capo_database_migration_service.errors.kms_access_denied_fault.KMSAccessDeniedFault: <p>The ciphertext references a key that doesn't exist or that the DMS account doesn't have access to.</p>
        capo_database_migration_service.errors.kms_disabled_fault.KMSDisabledFault: <p>The specified KMS key isn't enabled.</p>
        capo_database_migration_service.errors.kms_fault.KMSFault: <p>An Key Management Service (KMS) error is preventing access to KMS.</p>
        capo_database_migration_service.errors.kms_invalid_state_fault.KMSInvalidStateFault: <p>The state of the specified KMS resource isn't valid for this request.</p>
        capo_database_migration_service.errors.kms_key_not_accessible_fault.KMSKeyNotAccessibleFault: <p>DMS cannot access the KMS key.</p>
        capo_database_migration_service.errors.kms_not_found_fault.KMSNotFoundFault: <p>The specified KMS entity or resource can't be found.</p>
        capo_database_migration_service.errors.resource_already_exists_fault.ResourceAlreadyExistsFault: <p>The resource you are attempting to create already exists.</p>
        capo_database_migration_service.errors.resource_not_found_fault.ResourceNotFoundFault: <p>The resource could not be found.</p>
        capo_database_migration_service.errors.s3_access_denied_fault.S3AccessDeniedFault: <p>Insufficient privileges are preventing access to an Amazon S3 object.</p>
        capo_database_migration_service.errors.s3_resource_not_found_fault.S3ResourceNotFoundFault: <p>A specified Amazon S3 bucket, bucket folder, or other object can't be found.</p>
        capo_database_migration_service.errors.UnknownServiceError: The service returned an error code this client does not model.
    """

    def _handler(
        req: "OperationRequest[capo_database_migration_service.types.start_replication_task_assessment_run_message.StartReplicationTaskAssessmentRunMessage]",
    ) -> OperationResponse[
        "capo_database_migration_service.types.start_replication_task_assessment_run_response.StartReplicationTaskAssessmentRunResponse"
    ]:
        import capo_database_migration_service._operations.amazon_dm_sv20160101.start_replication_task_assessment_run

        output, http_response = (
            capo_database_migration_service._operations.amazon_dm_sv20160101.start_replication_task_assessment_run.start_replication_task_assessment_run(
                req.options, req.input
            )
        )
        return OperationResponse(output=output, response=http_response)

    interceptors_, options_ = self.operation_options(
        config_overrides, OperationLogging("StartReplicationTaskAssessmentRun")
    )
    input_: capo_database_migration_service.types.start_replication_task_assessment_run_message.StartReplicationTaskAssessmentRunMessage = {
        "replication_task_arn": replication_task_arn,
        "service_access_role_arn": service_access_role_arn,
        "result_location_bucket": result_location_bucket,
        "assessment_run_name": assessment_run_name,
    }
    if result_location_folder is not None:
        input_["result_location_folder"] = result_location_folder
    if result_encryption_mode is not None:
        input_["result_encryption_mode"] = result_encryption_mode
    if result_kms_key_arn is not None:
        input_["result_kms_key_arn"] = result_kms_key_arn
    if include_only is not None:
        input_["include_only"] = include_only
    if exclude is not None:
        input_["exclude"] = exclude
    if tags is not None:
        input_["tags"] = tags

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