def METHOD_NAME(self, request: Request, pk: int = None):
    if not settings.PROJECT_METADATA_TABLE_NAME_DYNAMO:
        raise DynamoNotEnabledError()
    project = self.get_object()
    if project.is_too_large:
        raise ProjectTooLargeError()
    identity_count = Identity.objects.filter(environment__project=project).count()
    if identity_count > settings.MAX_SELF_MIGRATABLE_IDENTITIES:
        raise TooManyIdentitiesError()
    identity_migrator = IdentityMigrator(project.id)
    if not identity_migrator.can_migrate:
        raise ProjectMigrationError()
    identity_migrator.trigger_migration()
    return Response(status=status.HTTP_202_ACCEPTED)