Skip to content

disassociate_created_artifact

disassociate_created_artifact(
    progress_update_stream: ProgressUpdateStream,
    migration_task_name: MigrationTaskName,
    created_artifact_name: CreatedArtifactName,
    *,
    config_overrides: Optional[MigrationHubClientConfig] = None,
    dry_run: Optional[DryRun] = None,
) -> DisassociateCreatedArtifactResult

Disassociates a created artifact of an AWS resource with a migration task performed by a migration tool that was previously associated. This API has the following traits:

  • A migration user can call the DisassociateCreatedArtifacts operation to disassociate a created AWS Artifact from a migration task.

  • The created artifact name must be provided in ARN (Amazon Resource Name) format which will contain information about type and region; for example: arn:aws:ec2:us-east-1:488216288981:image/ami-6d0ba87b.

  • Examples of the AWS resource behind the created artifact are, AMI's, EC2 instance, or RDS instance, etc.

Parameters:

  • progress_update_stream (ProgressUpdateStream) –

    The name of the ProgressUpdateStream.

  • migration_task_name (MigrationTaskName) –

    Unique identifier that references the migration task to be disassociated with the artifact. Do not store personal data in this field.

  • created_artifact_name (CreatedArtifactName) –

    An ARN of the AWS resource related to the migration (e.g., AMI, EC2 instance, RDS instance, etc.)

  • dry_run (Optional[DryRun], default: None ) –

    Optional boolean flag to indicate whether any effect should take place. Used to test if the caller has permission to make the call.

Raises:

  • AccessDeniedException –

    You do not have sufficient access to perform this action.

  • DryRunOperation –

    Exception raised to indicate a successfully authorized action when the DryRun flag is set to "true".

  • HomeRegionNotSetException –

    The home region is not set. Set the home region to continue.

  • InternalServerError –

    Exception raised when an internal, configuration, or dependency error is encountered.

  • InvalidInputException –

    Exception raised when the provided input violates a policy constraint or is entered in the wrong format or data type.

  • ResourceNotFoundException –

    Exception raised when the request references a resource (Application Discovery Service configuration, update stream, migration task, etc.) that does not exist in Application Discovery Service (Application Discovery Service) or in Migration Hub's repository.

  • ServiceUnavailableException –

    Exception raised when there is an internal, configuration, or dependency error encountered.

  • ThrottlingException –

    The request was denied due to request throttling.

  • UnauthorizedOperation –

    Exception raised to indicate a request was not authorized when the DryRun flag is set to "true".

  • UnknownServiceError –

    The service returned an error code this client does not model.

Source code in docs_src/capo_migration_hub/_services/migration_hub.py
def disassociate_created_artifact(
    self,
    progress_update_stream: "capo_migration_hub.types.progress_update_stream.ProgressUpdateStream",
    migration_task_name: "capo_migration_hub.types.migration_task_name.MigrationTaskName",
    created_artifact_name: "capo_migration_hub.types.created_artifact_name.CreatedArtifactName",
    *,
    config_overrides: Optional[MigrationHubClientConfig] = None,
    dry_run: Optional["capo_migration_hub.types.dry_run.DryRun"] = None,
) -> "capo_migration_hub.types.disassociate_created_artifact_result.DisassociateCreatedArtifactResult":
    """<p>Disassociates a created artifact of an AWS resource with a migration task performed by a migration tool that was previously associated. This API has the following traits:</p> <ul> <li> <p>A migration user can call the <code>DisassociateCreatedArtifacts</code> operation to disassociate a created AWS Artifact from a migration task.</p> </li> <li> <p>The created artifact name must be provided in ARN (Amazon Resource Name) format which will contain information about type and region; for example: <code>arn:aws:ec2:us-east-1:488216288981:image/ami-6d0ba87b</code>.</p> </li> <li> <p>Examples of the AWS resource behind the created artifact are, AMI's, EC2 instance, or RDS instance, etc.</p> </li> </ul>

    Args:
        progress_update_stream: <p>The name of the ProgressUpdateStream. </p>
        migration_task_name: <p>Unique identifier that references the migration task to be disassociated with the artifact. <i>Do not store personal data in this field.</i> </p>
        created_artifact_name: <p>An ARN of the AWS resource related to the migration (e.g., AMI, EC2 instance, RDS instance, etc.)</p>
        dry_run: <p>Optional boolean flag to indicate whether any effect should take place. Used to test if the caller has permission to make the call.</p>

    Raises:
        capo_migration_hub.errors.access_denied_exception.AccessDeniedException: <p>You do not have sufficient access to perform this action.</p>
        capo_migration_hub.errors.dry_run_operation.DryRunOperation: <p>Exception raised to indicate a successfully authorized action when the <code>DryRun</code> flag is set to "true".</p>
        capo_migration_hub.errors.home_region_not_set_exception.HomeRegionNotSetException: <p>The home region is not set. Set the home region to continue.</p>
        capo_migration_hub.errors.internal_server_error.InternalServerError: <p>Exception raised when an internal, configuration, or dependency error is encountered.</p>
        capo_migration_hub.errors.invalid_input_exception.InvalidInputException: <p>Exception raised when the provided input violates a policy constraint or is entered in the wrong format or data type.</p>
        capo_migration_hub.errors.resource_not_found_exception.ResourceNotFoundException: <p>Exception raised when the request references a resource (Application Discovery Service configuration, update stream, migration task, etc.) that does not exist in Application Discovery Service (Application Discovery Service) or in Migration Hub's repository.</p>
        capo_migration_hub.errors.service_unavailable_exception.ServiceUnavailableException: <p>Exception raised when there is an internal, configuration, or dependency error encountered.</p>
        capo_migration_hub.errors.throttling_exception.ThrottlingException: <p>The request was denied due to request throttling.</p>
        capo_migration_hub.errors.unauthorized_operation.UnauthorizedOperation: <p>Exception raised to indicate a request was not authorized when the <code>DryRun</code> flag is set to "true".</p>
        capo_migration_hub.errors.UnknownServiceError: The service returned an error code this client does not model.
    """

    def _handler(
        req: "OperationRequest[capo_migration_hub.types.disassociate_created_artifact_request.DisassociateCreatedArtifactRequest]",
    ) -> OperationResponse[
        "capo_migration_hub.types.disassociate_created_artifact_result.DisassociateCreatedArtifactResult"
    ]:
        import capo_migration_hub._operations.aws_migration_hub.disassociate_created_artifact

        output, http_response = (
            capo_migration_hub._operations.aws_migration_hub.disassociate_created_artifact.disassociate_created_artifact(
                req.options, req.input
            )
        )
        return OperationResponse(output=output, response=http_response)

    interceptors_, options_ = self.operation_options(
        config_overrides, OperationLogging("DisassociateCreatedArtifact")
    )
    input_: capo_migration_hub.types.disassociate_created_artifact_request.DisassociateCreatedArtifactRequest = {
        "progress_update_stream": progress_update_stream,
        "migration_task_name": migration_task_name,
        "created_artifact_name": created_artifact_name,
    }
    if dry_run is not None:
        input_["dry_run"] = dry_run

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